From 348787a1b73463484b01a5f28bbbaf44bf98769a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dundar=20G=C3=B6c?= Date: Wed, 13 Oct 2021 18:57:29 +0200 Subject: [PATCH] ci: make labeler also work for breaking changes This means that "refactor!: description" and "refactor(scope)!: description" will add the "refactor" label. --- .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 c7a331c657..4aa56f5d0e 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -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