From 80ab8c6b9e175df41c790608d8b7386276e2b79e Mon Sep 17 00:00:00 2001 From: Alec Thomas Date: Tue, 13 Feb 2024 09:56:57 +1100 Subject: [PATCH] chore: workflow tweaks - Clear triage label when moved to next - Only add triage label on new tickets --- .github/workflows/workflow-next.yml | 18 ++++++++++++++++++ .github/workflows/workflow-roadmap.yml | 1 + .github/workflows/workflow-triage.yml | 2 -- 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/workflow-next.yml diff --git a/.github/workflows/workflow-next.yml b/.github/workflows/workflow-next.yml new file mode 100644 index 0000000000..abc21e420c --- /dev/null +++ b/.github/workflows/workflow-next.yml @@ -0,0 +1,18 @@ +# This name needs to be kept in sync with the workflow_run event in workflow-roadmap.yml +name: Clear triage label when moved to next +on: + issues: + types: + - labeled +jobs: + clear-triage-label: + if: github.event.label.name == 'next' + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - run: gh issue edit "$NUMBER" --remove-label triage + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }} + NUMBER: ${{ github.event.issue.number }} diff --git a/.github/workflows/workflow-roadmap.yml b/.github/workflows/workflow-roadmap.yml index 5a7c9bb708..da7bc7abce 100644 --- a/.github/workflows/workflow-roadmap.yml +++ b/.github/workflows/workflow-roadmap.yml @@ -14,6 +14,7 @@ on: workflows: - Add triage label to new issues - Clear workflow labels once an issue is assigned + - Clear triage label when moved to next types: [completed] concurrency: group: ${{ github.ref }}-workflow-roadmap diff --git a/.github/workflows/workflow-triage.yml b/.github/workflows/workflow-triage.yml index 1c1717e3fb..d03f188005 100644 --- a/.github/workflows/workflow-triage.yml +++ b/.github/workflows/workflow-triage.yml @@ -3,9 +3,7 @@ name: Add triage label to new issues on: issues: types: - - reopened - opened - - unassigned jobs: label-issues: runs-on: ubuntu-latest