From e6d479ac3e11111fbf5ccb0fd83be76d01e58ec4 Mon Sep 17 00:00:00 2001 From: Sean Colsen Date: Tue, 5 Dec 2023 11:45:34 -0500 Subject: [PATCH 1/2] Remove code to sync repo with GitHub project --- .../actions/project_update/project_update.py | 207 ------------------ .../actions/project_update/requirements.txt | 2 - .github/sync.yml | 56 ----- .github/workflows/add-to-project.yml | 38 ---- .../update-project-on-issue-close.yml | 27 --- .../update-project-on-issue-edit.yml | 25 --- .../update-project-on-issue-label.yml | 156 ------------- .../workflows/update-project-on-pr-edit.yml | 27 --- .../workflows/update-project-on-pr-label.yml | 156 ------------- 9 files changed, 694 deletions(-) delete mode 100644 .github/actions/project_update/project_update.py delete mode 100644 .github/actions/project_update/requirements.txt delete mode 100644 .github/workflows/add-to-project.yml delete mode 100644 .github/workflows/update-project-on-issue-close.yml delete mode 100644 .github/workflows/update-project-on-issue-edit.yml delete mode 100644 .github/workflows/update-project-on-issue-label.yml delete mode 100644 .github/workflows/update-project-on-pr-edit.yml delete mode 100644 .github/workflows/update-project-on-pr-label.yml diff --git a/.github/actions/project_update/project_update.py b/.github/actions/project_update/project_update.py deleted file mode 100644 index a6efc66b70..0000000000 --- a/.github/actions/project_update/project_update.py +++ /dev/null @@ -1,207 +0,0 @@ -import argparse -import os -from string import Template - -from dateutil import parser -import requests - - -GITHUB_TOKEN = os.environ['MATHESAR_ORG_GITHUB_TOKEN'] - -GITHUB_ORG = 'mathesar-foundation' -MATHESAR_PROJECT_NUMBER = 1 - - -def run_graphql(graphql): - headers = { - 'Authorization': f'Bearer {GITHUB_TOKEN}', - 'GraphQL-Features': 'projects_next_graphql' - } - request = requests.post( - 'https://api.github.com/graphql', - json={'query': graphql}, - headers=headers - ) - if request.status_code == 200: - result = request.json() - print(f'\tResult of query:\n\t\t{result}') - return result - else: - raise Exception(f'\tQuery failed to run by returning code of {request.status_code}.\n\t\t{graphql}') - - -def get_project_data(): - print(f'Getting project data for project #{MATHESAR_PROJECT_NUMBER}...') - query_template = Template( - """ - { - organization(login: "$github_org") { - projectV2(number: $project_num) { - id - fields(first: 20) { - nodes { - ... on ProjectV2Field { - id - name - } - ... on ProjectV2IterationField { - id - name - configuration { - iterations { - startDate - id - } - } - } - ... on ProjectV2SingleSelectField { - id - name - options { - id - name - } - } - } - } - } - } - } - """ - ) - query = query_template.substitute(github_org=GITHUB_ORG, project_num=MATHESAR_PROJECT_NUMBER) - result = run_graphql(query) - return result['data']['organization']['projectV2'] - - -def add_item_to_project(content_id, project_data): - print(f'Adding item #{content_id} to project...') - query_template = Template( - """ - mutation { - addProjectV2ItemById(input: {projectId: "$project_id" contentId: "$content_id"}) { - item { - id - } - } - } - """ - ) - query = query_template.substitute( - project_id=project_data['id'], - content_id=content_id - ) - result = run_graphql(query) - try: - return result['data']['addProjectV2ItemById']['item']['id'] - except KeyError as e: - print(f'\tAdd item error:\n\t\t{result}') - raise e - - -def get_field_data(field_name, project_data): - fields = project_data['fields']['nodes'] - field_data = [field for field in fields if field['name'] == field_name][0] - return field_data - - -def get_option_data(option_name, field_data): - options = field_data['options'] - option_data = [option for option in options if option['name'] == option_name][0] - return option_data - - -def update_field_value_for_single_select_item(item_id, field, value, project_data): - print(f'Updating {item_id} with field ID: {field}, field value: {value}...') - query_template = Template( - """ - mutation { - updateProjectV2ItemFieldValue( - input: { - projectId: "$project_id" - itemId: "$item_id" - fieldId: "$field_id" - value: { - singleSelectOptionId: "$value" - } - } - ) { - projectV2Item { - id - } - } - } - """ - ) - field_data = get_field_data(field, project_data) - option_data = get_option_data(value, field_data) - value_to_save = option_data['id'] - query = query_template.substitute( - project_id=project_data['id'], - item_id=item_id, - field_id=field_data['id'], - value=value_to_save - ) - result = run_graphql(query) - return result - - -def update_field_value_for_text_item(item_id, field, value, project_data): - print(f'Updating {item_id} with field ID: {field}, field value: {value}...') - query_template = Template( - """ - mutation { - updateProjectV2ItemFieldValue( - input: { - projectId: "$project_id" - itemId: "$item_id" - fieldId: "$field_id" - value: { - text: "$value" - } - } - ) { - projectV2Item { - id - } - } - } - """ - ) - field_data = get_field_data(field, project_data) - value_to_save = value - query = query_template.substitute( - project_id=project_data['id'], - item_id=item_id, - field_id=field_data['id'], - value=value_to_save - ) - result = run_graphql(query) - return result - - -def get_arguments(): - parser = argparse.ArgumentParser() - parser.add_argument("content_id", help="The issue/PR number to add/update") - parser.add_argument("--status", help="Status to set ") - parser.add_argument("--priority", help="Priority to set ") - parser.add_argument("--work", help="Work to set ") - parser.add_argument("--timestamp", help="Timestamp to set ") - return parser.parse_args() - - -if __name__ == '__main__': - args = get_arguments() - content_id = args.content_id - project_data = get_project_data() - item_id = add_item_to_project(content_id, project_data) - if args.status: - update_field_value_for_single_select_item(item_id, 'Status', args.status, project_data) - if args.priority: - update_field_value_for_single_select_item(item_id, 'Priority', args.priority, project_data) - if args.work: - update_field_value_for_single_select_item(item_id, 'Work', args.work, project_data) - if args.timestamp: - timestamp = parser.parse(args.timestamp) - timestamp_str = timestamp.strftime('%Y-%m-%d %H:%M:%S') - update_field_value_for_text_item(item_id, 'Timestamp', timestamp_str, project_data) diff --git a/.github/actions/project_update/requirements.txt b/.github/actions/project_update/requirements.txt deleted file mode 100644 index bc314c3c23..0000000000 --- a/.github/actions/project_update/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -python-dateutil -requests diff --git a/.github/sync.yml b/.github/sync.yml index 8088abeb86..9de822878f 100644 --- a/.github/sync.yml +++ b/.github/sync.yml @@ -1,80 +1,24 @@ mathesar-foundation/mathesar-ansible: - - .github/actions/project_update/ - - .github/workflows/add-to-project.yml - .github/workflows/toc.yml - .github/workflows/stale.yml - - .github/workflows/update-project-on-issue-close.yml - - .github/workflows/update-project-on-issue-edit.yml - - .github/workflows/update-project-on-issue-label.yml - - .github/workflows/update-project-on-pr-edit.yml - - .github/workflows/update-project-on-pr-label.yml mathesar-foundation/mathesar-data-playground: - - .github/actions/project_update/ - - .github/workflows/add-to-project.yml - .github/workflows/toc.yml - .github/workflows/stale.yml - - .github/workflows/update-project-on-issue-close.yml - - .github/workflows/update-project-on-issue-edit.yml - - .github/workflows/update-project-on-issue-label.yml - - .github/workflows/update-project-on-pr-edit.yml - - .github/workflows/update-project-on-pr-label.yml mathesar-foundation/mathesar-design: - - .github/actions/project_update/ - - .github/workflows/add-to-project.yml - .github/workflows/toc.yml - .github/workflows/stale.yml - - .github/workflows/update-project-on-issue-close.yml - - .github/workflows/update-project-on-issue-edit.yml - - .github/workflows/update-project-on-issue-label.yml - - .github/workflows/update-project-on-pr-edit.yml - - .github/workflows/update-project-on-pr-label.yml mathesar-foundation/mathesar-internal-crm: - - .github/actions/project_update/ - - .github/workflows/add-to-project.yml - .github/workflows/toc.yml - .github/workflows/stale.yml - - .github/workflows/update-project-on-issue-close.yml - - .github/workflows/update-project-on-issue-edit.yml - - .github/workflows/update-project-on-issue-label.yml - - .github/workflows/update-project-on-pr-edit.yml - - .github/workflows/update-project-on-pr-label.yml mathesar-foundation/mathesar-private-notes: - - .github/actions/project_update/ - - .github/workflows/add-to-project.yml - .github/workflows/toc.yml - .github/workflows/stale.yml - - .github/workflows/update-project-on-issue-close.yml - - .github/workflows/update-project-on-issue-edit.yml - - .github/workflows/update-project-on-issue-label.yml - - .github/workflows/update-project-on-pr-edit.yml - - .github/workflows/update-project-on-pr-label.yml mathesar-foundation/mathesar-scripts: - - .github/actions/project_update/ - - .github/workflows/add-to-project.yml - .github/workflows/toc.yml - .github/workflows/stale.yml - - .github/workflows/update-project-on-issue-close.yml - - .github/workflows/update-project-on-issue-edit.yml - - .github/workflows/update-project-on-issue-label.yml - - .github/workflows/update-project-on-pr-edit.yml - - .github/workflows/update-project-on-pr-label.yml mathesar-foundation/mathesar-website: - - .github/actions/project_update/ - - .github/workflows/add-to-project.yml - .github/workflows/toc.yml - .github/workflows/stale.yml - - .github/workflows/update-project-on-issue-close.yml - - .github/workflows/update-project-on-issue-edit.yml - - .github/workflows/update-project-on-issue-label.yml - - .github/workflows/update-project-on-pr-edit.yml - - .github/workflows/update-project-on-pr-label.yml mathesar-foundation/mathesar-wiki: - - .github/actions/project_update/ - - .github/workflows/add-to-project.yml - .github/workflows/toc.yml - .github/workflows/stale.yml - - .github/workflows/update-project-on-issue-close.yml - - .github/workflows/update-project-on-issue-edit.yml - - .github/workflows/update-project-on-issue-label.yml - - .github/workflows/update-project-on-pr-edit.yml - - .github/workflows/update-project-on-pr-label.yml diff --git a/.github/workflows/add-to-project.yml b/.github/workflows/add-to-project.yml deleted file mode 100644 index 9a1914ec02..0000000000 --- a/.github/workflows/add-to-project.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Add new issues and PRs to project -on: - issues: - types: [opened] - pull_request_target: - types: [opened] - -jobs: - add_item_to_project: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.9' - - - name: Install dependencies - run: | - cd .github/actions/project_update/ - pip install -r requirements.txt - - - name: Add PR to project - if: ${{ github.event_name == 'pull_request_target' }} - env: - MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}} - run: | - cd .github/actions/project_update/ - python project_update.py ${{ github.event.pull_request.node_id }} --status Started - - - name: Add issue to project - if: ${{ github.event_name == 'issues' }} - env: - MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}} - run: | - cd .github/actions/project_update/ - python project_update.py ${{ github.event.issue.node_id }} --status Triage diff --git a/.github/workflows/update-project-on-issue-close.yml b/.github/workflows/update-project-on-issue-close.yml deleted file mode 100644 index 150ff8e71f..0000000000 --- a/.github/workflows/update-project-on-issue-close.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Update project on issue closed -on: - issues: - types: [closed] - -jobs: - update_project_on_issue_close: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.9' - - - name: Install dependencies - run: | - cd .github/actions/project_update/ - pip install -r requirements.txt - - - name: Update status and priority - run: | - cd .github/actions/project_update/ - python project_update.py ${{ github.event.issue.node_id }} --status Done - env: - MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}} diff --git a/.github/workflows/update-project-on-issue-edit.yml b/.github/workflows/update-project-on-issue-edit.yml deleted file mode 100644 index f52fbfcaa6..0000000000 --- a/.github/workflows/update-project-on-issue-edit.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Update project on issue edit -on: [issues, issue_comment] - -jobs: - update_project_on_issue_edit: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.9' - - - name: Install dependencies - run: | - cd .github/actions/project_update/ - pip install -r requirements.txt - - - name: Update timestamp - run: | - cd .github/actions/project_update/ - python project_update.py ${{ github.event.issue.node_id }} --timestamp ${{ github.event.issue.updated_at }} - env: - MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}} diff --git a/.github/workflows/update-project-on-issue-label.yml b/.github/workflows/update-project-on-issue-label.yml deleted file mode 100644 index 2ce2dea128..0000000000 --- a/.github/workflows/update-project-on-issue-label.yml +++ /dev/null @@ -1,156 +0,0 @@ -name: Update project on issue label change -on: - issues: - types: [opened, labeled] - -jobs: - update_project_on_issue_label_change: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.9' - - - name: Install dependencies - run: | - cd .github/actions/project_update/ - pip install -r requirements.txt - - - name: Update Triage issues - if: "${{ contains(github.event.issue.labels.*.name, 'status: triage') }}" - env: - MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}} - run: | - cd .github/actions/project_update/ - python project_update.py ${{ github.event.issue.node_id }} --status Triage - - - name: Update Draft issues - if: "${{ contains(github.event.issue.labels.*.name, 'status: draft') }}" - env: - MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}} - run: | - cd .github/actions/project_update/ - python project_update.py ${{ github.event.issue.node_id }} --status Draft - - - name: Update Blocked issues - if: "${{ contains(github.event.issue.labels.*.name, 'status: blocked') }}" - env: - MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}} - run: | - cd .github/actions/project_update/ - python project_update.py ${{ github.event.issue.node_id }} --status Blocked - - - name: Update Ready issues - if: "${{ contains(github.event.issue.labels.*.name, 'status: ready') }}" - env: - MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}} - run: | - cd .github/actions/project_update/ - python project_update.py ${{ github.event.issue.node_id }} --status Ready - - - name: Update Started issues - if: "${{ contains(github.event.issue.labels.*.name, 'status: started') }}" - env: - MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}} - run: | - cd .github/actions/project_update/ - python project_update.py ${{ github.event.issue.node_id }} --status Started - - - name: Update Review issues - if: "${{ contains(github.event.issue.labels.*.name, 'status: review') }}" - env: - MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}} - run: | - cd .github/actions/project_update/ - python project_update.py ${{ github.event.issue.node_id }} --status Review - - - name: Update Waiting issues - if: "${{ contains(github.event.issue.labels.*.name, 'status: waiting') }}" - env: - MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}} - run: | - cd .github/actions/project_update/ - python project_update.py ${{ github.event.issue.node_id }} --status Waiting - - - name: Update Done issues - if: "${{ contains(github.event.issue.labels.*.name, 'status: done') }}" - env: - MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}} - run: | - cd .github/actions/project_update/ - python project_update.py ${{ github.event.issue.node_id }} --status Done - - - name: Update Future issues - if: "${{ contains(github.event.issue.labels.*.name, 'priority: future') }}" - env: - MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}} - run: | - cd .github/actions/project_update/ - python project_update.py ${{ github.event.issue.node_id }} --status Draft - - - name: Update Urgent issues - if: "${{ contains(github.event.issue.labels.*.name, 'priority: urgent') }}" - env: - MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}} - run: | - cd .github/actions/project_update/ - python project_update.py ${{ github.event.issue.node_id }} --priority Urgent - - - name: Update documentation issues - if: "${{ contains(github.event.issue.labels.*.name, 'work: documentation') }}" - env: - MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}} - run: | - cd .github/actions/project_update/ - python project_update.py ${{ github.event.issue.node_id }} --work Documentation - - - name: Update infrastructure issues - if: "${{ contains(github.event.issue.labels.*.name, 'work: infrastructure') }}" - env: - MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}} - run: | - cd .github/actions/project_update/ - python project_update.py ${{ github.event.issue.node_id }} --work Infrastructure - - - name: Update product issues - if: "${{ contains(github.event.issue.labels.*.name, 'work: product') }}" - env: - MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}} - run: | - cd .github/actions/project_update/ - python project_update.py ${{ github.event.issue.node_id }} --work Product - - - name: Update design issues - if: "${{ contains(github.event.issue.labels.*.name, 'work: design') }}" - env: - MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}} - run: | - cd .github/actions/project_update/ - python project_update.py ${{ github.event.issue.node_id }} --work Design - - - name: Update frontend issues - if: "${{ contains(github.event.issue.labels.*.name, 'work: frontend') }}" - env: - MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}} - run: | - cd .github/actions/project_update/ - python project_update.py ${{ github.event.issue.node_id }} --work Frontend - - - name: Update backend issues - if: "${{ contains(github.event.issue.labels.*.name, 'work: backend') }}" - env: - MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}} - run: | - cd .github/actions/project_update/ - python project_update.py ${{ github.event.issue.node_id }} --work Backend - - - name: Update database issues - if: "${{ contains(github.event.issue.labels.*.name, 'work: database') }}" - env: - MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}} - run: | - cd .github/actions/project_update/ - python project_update.py ${{ github.event.issue.node_id }} --work Backend diff --git a/.github/workflows/update-project-on-pr-edit.yml b/.github/workflows/update-project-on-pr-edit.yml deleted file mode 100644 index 93433320c3..0000000000 --- a/.github/workflows/update-project-on-pr-edit.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Update project on PR edit -on: - pull_request_target: - types: [assigned, unassigned, labeled, unlabeled, opened, edited, closed, reopened, synchronize, converted_to_draft, ready_for_review, locked, unlocked, review_requested, review_request_removed, auto_merge_enabled, auto_merge_disabled] - -jobs: - update_project_on_pr_edit: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.9' - - - name: Install dependencies - run: | - cd .github/actions/project_update/ - pip install -r requirements.txt - - - name: Update timestamp - run: | - cd .github/actions/project_update/ - python project_update.py ${{ github.event.pull_request.node_id }} --timestamp ${{ github.event.pull_request.updated_at }} - env: - MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}} diff --git a/.github/workflows/update-project-on-pr-label.yml b/.github/workflows/update-project-on-pr-label.yml deleted file mode 100644 index cf169e6240..0000000000 --- a/.github/workflows/update-project-on-pr-label.yml +++ /dev/null @@ -1,156 +0,0 @@ -name: Update project on PR label change -on: - pull_request_target: - types: [opened, labeled] - -jobs: - update_project_on_pr_label_change: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.9' - - - name: Install dependencies - run: | - cd .github/actions/project_update/ - pip install -r requirements.txt - - - name: Update Triage PRs - if: "${{ contains(github.event.pull_request.labels.*.name, 'status: triage') }}" - env: - MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}} - run: | - cd .github/actions/project_update/ - python project_update.py ${{ github.event.pull_request.node_id }} --status Triage - - - name: Update Draft PRs - if: "${{ contains(github.event.pull_request.labels.*.name, 'status: draft') }}" - env: - MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}} - run: | - cd .github/actions/project_update/ - python project_update.py ${{ github.event.pull_request.node_id }} --status Draft - - - name: Update Blocked PRs - if: "${{ contains(github.event.pull_request.labels.*.name, 'status: blocked') }}" - env: - MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}} - run: | - cd .github/actions/project_update/ - python project_update.py ${{ github.event.pull_request.node_id }} --status Blocked - - - name: Update Waiting PRs - if: "${{ contains(github.event.pull_request.labels.*.name, 'status: waiting') }}" - env: - MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}} - run: | - cd .github/actions/project_update/ - python project_update.py ${{ github.event.pull_request.node_id }} --status Waiting - - - name: Update Ready PRs - if: "${{ contains(github.event.pull_request.labels.*.name, 'status: ready') }}" - env: - MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}} - run: | - cd .github/actions/project_update/ - python project_update.py ${{ github.event.pull_request.node_id }} --status Ready - - - name: Update Started PRs - if: "${{ contains(github.event.pull_request.labels.*.name, 'status: started') }}" - env: - MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}} - run: | - cd .github/actions/project_update/ - python project_update.py ${{ github.event.pull_request.node_id }} --status Started - - - name: Update Review PRs - if: "${{ contains(github.event.pull_request.labels.*.name, 'status: review') }}" - env: - MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}} - run: | - cd .github/actions/project_update/ - python project_update.py ${{ github.event.pull_request.node_id }} --status Review - - - name: Update Done PRs - if: "${{ contains(github.event.pull_request.labels.*.name, 'status: done') }}" - env: - MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}} - run: | - cd .github/actions/project_update/ - python project_update.py ${{ github.event.pull_request.node_id }} --status Done - - - name: Update Future PRs - if: "${{ contains(github.event.pull_request.labels.*.name, 'priority: future') }}" - env: - MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}} - run: | - cd .github/actions/project_update/ - python project_update.py ${{ github.event.pull_request.node_id }} --status Draft - - - name: Update Urgent PRs - if: "${{ contains(github.event.pull_request.labels.*.name, 'priority: urgent') }}" - env: - MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}} - run: | - cd .github/actions/project_update/ - python project_update.py ${{ github.event.pull_request.node_id }} --priority Urgent - - - name: Update documentation PRs - if: "${{ contains(github.event.pull_request.labels.*.name, 'work: documentation') }}" - env: - MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}} - run: | - cd .github/actions/project_update/ - python project_update.py ${{ github.event.pull_request.node_id }} --work Documentation - - - name: Update infrastructure PRs - if: "${{ contains(github.event.pull_request.labels.*.name, 'work: infrastructure') }}" - env: - MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}} - run: | - cd .github/actions/project_update/ - python project_update.py ${{ github.event.pull_request.node_id }} --work Infrastructure - - - name: Update product PRs - if: "${{ contains(github.event.pull_request.labels.*.name, 'work: product') }}" - env: - MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}} - run: | - cd .github/actions/project_update/ - python project_update.py ${{ github.event.pull_request.node_id }} --work Product - - - name: Update design PRs - if: "${{ contains(github.event.pull_request.labels.*.name, 'work: design') }}" - env: - MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}} - run: | - cd .github/actions/project_update/ - python project_update.py ${{ github.event.pull_request.node_id }} --work Design - - - name: Update frontend PRs - if: "${{ contains(github.event.pull_request.labels.*.name, 'work: frontend') }}" - env: - MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}} - run: | - cd .github/actions/project_update/ - python project_update.py ${{ github.event.pull_request.node_id }} --work Frontend - - - name: Update backend PRs - if: "${{ contains(github.event.pull_request.labels.*.name, 'work: backend') }}" - env: - MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}} - run: | - cd .github/actions/project_update/ - python project_update.py ${{ github.event.pull_request.node_id }} --work Backend - - - name: Update database PRs - if: "${{ contains(github.event.pull_request.labels.*.name, 'work: database') }}" - env: - MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}} - run: | - cd .github/actions/project_update/ - python project_update.py ${{ github.event.pull_request.node_id }} --work Backend From ad1a11f78cfe519017dea715d54b06ec8e1607cd Mon Sep 17 00:00:00 2001 From: Sean Colsen Date: Tue, 5 Dec 2023 11:45:52 -0500 Subject: [PATCH 2/2] Change triage label from status to needs --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- .github/ISSUE_TEMPLATE/feature_request.md | 2 +- .github/workflows/test-and-lint-code.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 714a0a08f7..d7a4f0a623 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,7 +1,7 @@ --- name: Bug report about: Report an issue with Mathesar -labels: "type: bug, status: triage" +labels: "type: bug, needs: triage" --- ## Description diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index d90ea9e303..1ef049c3e9 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,7 +1,7 @@ --- name: Feature request about: Suggest a new feature for Mathesar -labels: "type: enhancement, status: triage" +labels: "type: enhancement, needs: triage" --- ## Problem diff --git a/.github/workflows/test-and-lint-code.yml b/.github/workflows/test-and-lint-code.yml index b59fbe713c..ca04c29e0b 100644 --- a/.github/workflows/test-and-lint-code.yml +++ b/.github/workflows/test-and-lint-code.yml @@ -282,7 +282,7 @@ jobs: create_pr_comments: false dedupe_issues: true working_directory: './mathesar_ui' - issue_labels: 'restricted: maintainers,type: bug,work: frontend,status: triage' + issue_labels: 'restricted: maintainers,type: bug,work: frontend,needs: triage' production_flag: true continue-on-error: true