Merge pull request #16970 from dundargoc/ci/serialize-labeler-workflow

This commit is contained in:
James McCoy 2022-01-07 10:33:19 -05:00 committed by GitHub
commit b4fbb9dcf2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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