From c55b09e90151b019c9d7adfb75bef2bde0de4e4d 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 | 50 +++++++++++++++++++++++++++++++++++ 1 file changed, 50 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..9cbbee40f4 --- /dev/null +++ b/.github/workflows/labels.yaml @@ -0,0 +1,50 @@ +name: Conventional Commit Labels + +on: + push: + branches: + - frc/abelaction + +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