ci: make labeler also work for breaking changes

This means that

"refactor!: description"

and

"refactor(scope)!: description"

will add the "refactor" label.
This commit is contained in:
Dundar Göc 2021-10-13 18:57:29 +02:00
parent 33e79237bc
commit 348787a1b7

View File

@ -24,7 +24,7 @@ jobs:
- run: gh pr checkout ${{ github.event.pull_request.number }}
# Extract type and try to add it as a label
- run: gh pr edit --add-label "$(echo "${{ github.event.pull_request.title }}" | sed -E 's|([[:alpha:]]+)(\(.*\))?:.*|\1|')" || true
- run: gh pr edit --add-label "$(echo "${{ github.event.pull_request.title }}" | sed -E 's|([[:alpha:]]+)(\(.*\))?!?:.*|\1|')" || true
# Extract scope and try to add it as a label
- run: gh pr edit --add-label "$(echo "${{ github.event.pull_request.title }}" | sed -E 's|[[:alpha:]]+\((.+)\):.*|\1|')" || true
- run: gh pr edit --add-label "$(echo "${{ github.event.pull_request.title }}" | sed -E 's|[[:alpha:]]+\((.+)\)!?:.*|\1|')" || true