From 44538edfa7b30c98caa59edda011b249eedd5d73 Mon Sep 17 00:00:00 2001 From: Francesco Cheinasso Date: Tue, 3 Dec 2024 17:03:08 +0100 Subject: [PATCH] ci: assign label based on conventional commits --- .github/workflows/labels.yaml | 51 +++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/labels.yaml diff --git a/.github/workflows/labels.yaml b/.github/workflows/labels.yaml new file mode 100644 index 0000000000..22a38e1889 --- /dev/null +++ b/.github/workflows/labels.yaml @@ -0,0 +1,51 @@ +name: Conventional Commit Labels + +on: + pull_request: + branches: [frc/abelaction] + types: + [opened, reopened, labeled, unlabeled] + +jobs: + validate-pr-title: + runs-on: ubuntu-latest + steps: + - name: Execute assign labels + id: action-assign-labels + uses: mauroalderete/action-assign-labels@v1.5.1 + with: + pull-request-number: ${{ github.event.pull_request.number }} + github-token: ${{ secrets.GITHUB_TOKEN }} + conventional-commits: | + conventional-commits: + - type: 'fix' + nouns: ['FIX', 'Fix', 'fix', 'FIXED', 'Fixed', 'fixed'] + labels: ['bug'] + - type: 'feature' + nouns: ['FEATURE', 'Feature', 'feature', 'FEAT', 'Feat', 'feat'] + labels: ['feature'] + - type: 'breaking_change' + nouns: ['BREAKING CHANGE', 'BREAKING', 'MAJOR'] + labels: ['BREAKING CHANGE'] + - type: 'docs' + nouns: ['DOCS', 'Docs', 'docs'] + labels: ['docs'] + - type: 'refactor' + nouns: ['REFACTOR', 'Refactor', 'refactor'] + labels: ['refactor'] + - type: 'test' + nouns: ['TEST', 'Test', 'test'] + labels: ['test'] + - type: 'style' + nouns: ['STYLE', 'Style', 'style'] + labels: ['style'] + - type: 'chore' + nouns: ['CHORE', 'Chore', 'chore'] + labels: ['chore'] + - type: 'ci' + nouns: ['CI', 'Ci', 'ci'] + labels: ['ci'] + - type: 'perf' + nouns: ['PERF', 'Perf', 'perf'] + labels: ['perf'] + \ No newline at end of file