diff options
-rw-r--r-- | .github/workflows/labeler.yml | 4 | ||||
-rw-r--r-- | scripts/lintcommit.lua | 2 |
2 files changed, 3 insertions, 3 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 diff --git a/scripts/lintcommit.lua b/scripts/lintcommit.lua index 98f9da246c..c30a1b10da 100644 --- a/scripts/lintcommit.lua +++ b/scripts/lintcommit.lua @@ -106,7 +106,7 @@ end function M.main(opt) _trace = not opt or not not opt.trace - local branch = run({'git', 'branch', '--show-current'}, true) + local branch = run({'git', 'rev-parse', '--abbrev-ref', 'HEAD'}, true) -- TODO(justinmk): check $GITHUB_REF local ancestor = run({'git', 'merge-base', 'origin/master', branch}) if not ancestor then |