diff --git a/.github/workflows/autolabeller.yml b/.github/workflows/autolabeller.yml index 6573d8b..0c88d64 100644 --- a/.github/workflows/autolabeller.yml +++ b/.github/workflows/autolabeller.yml @@ -10,6 +10,10 @@ on: - ready_for_review - edited +concurrency: + group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: validate: name: Validate PR title @@ -42,6 +46,8 @@ jobs: requireScope: false # Ensures the subject start with an uppercase character. subjectPattern: ^([A-Z]).+$ + headerPattern: '^\s*.*?\s(\w*)(?:\(([\w$.\-*/ ]*)\))?: (.*)$' + headerPatternCorrespondence: type, scope, subject subjectPatternError: | The subject "{subject}" found in the pull request title "{title}" didn't match the configured pattern. Please ensure that the subject