From 6e15b4c72fe32debf4ae40ce19e2ed49a17099c5 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Thu, 19 Oct 2023 11:40:20 -0600 Subject: [PATCH 1/2] Automatically assign high priority items to project 25. --- .github/workflows/assign-to-project.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/assign-to-project.yml diff --git a/.github/workflows/assign-to-project.yml b/.github/workflows/assign-to-project.yml new file mode 100644 index 0000000000..5b3814488f --- /dev/null +++ b/.github/workflows/assign-to-project.yml @@ -0,0 +1,23 @@ +name: Auto Assign to Project(s) + +on: + issues: + types: [opened, labeled] + pull_request: + types: [opened, labeled] + issue_comment: + types: [created] + +jobs: + assign_high_priority: + runs-on: ubuntu-latest + name: Assign to High Priority project + steps: + - name: Assign issues and pull requests with `priority:high` label to project 25 + uses: srggrs/assign-one-project-github-action@1.3.1 + if: | + contains(github.event.issue.labels.*.name, 'priority:high') || + contains(github.event.pull_request.labels.*.name, 'priority:high') + with: + project: 'https://github.com/ESCOMP/CTSM/projects/25' + column_name: 'Needs triage' From 804c281fb8e91afcdad023d827238501d9757e08 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Thu, 19 Oct 2023 12:00:16 -0600 Subject: [PATCH 2/2] Correct label. --- .github/workflows/assign-to-project.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/assign-to-project.yml b/.github/workflows/assign-to-project.yml index 5b3814488f..8c6c259c33 100644 --- a/.github/workflows/assign-to-project.yml +++ b/.github/workflows/assign-to-project.yml @@ -13,11 +13,11 @@ jobs: runs-on: ubuntu-latest name: Assign to High Priority project steps: - - name: Assign issues and pull requests with `priority:high` label to project 25 + - name: Assign issues and pull requests with `priority: high` label to project 25 uses: srggrs/assign-one-project-github-action@1.3.1 if: | - contains(github.event.issue.labels.*.name, 'priority:high') || - contains(github.event.pull_request.labels.*.name, 'priority:high') + contains(github.event.issue.labels.*.name, 'priority: high') || + contains(github.event.pull_request.labels.*.name, 'priority: high') with: project: 'https://github.com/ESCOMP/CTSM/projects/25' column_name: 'Needs triage'