From df06c36932bca3af9be2376acd1f9fb934bb3238 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dundar=20G=C3=B6c?= Date: Fri, 7 Jan 2022 13:32:14 +0100 Subject: [PATCH] ci: run type-scope job after the triage job This should prevent the scenario of one job accidentally removing a relevant label from the other. --- .github/workflows/labeler.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 76fc8793fa..f89c83e26f 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -1,7 +1,7 @@ name: "Pull Request Labeler" on: pull_request_target: - types: opened + types: [opened] jobs: triage: runs-on: ubuntu-latest @@ -14,6 +14,7 @@ jobs: repo-token: "${{ secrets.GITHUB_TOKEN }}" type-scope: runs-on: ubuntu-latest + needs: ["triage"] permissions: contents: write pull-requests: write @@ -25,6 +26,5 @@ jobs: steps: # Extract type and try to add it as a label - run: gh pr edit "$PR_NUMBER" --add-label "$(echo "$PR_TITLE" | sed -E 's|([[:alpha:]]+)(\(.*\))?!?:.*|\1|')" || true - # Extract scope and try to add it as a label - run: gh pr edit "$PR_NUMBER" --add-label "$(echo "$PR_TITLE" | sed -E 's|[[:alpha:]]+\((.+)\)!?:.*|\1|')" || true