From 55b1e0f2ba1eac95673e94e659473a801ff42d39 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 | 49 +++++++++++++++++++++++++++++++++++ 1 file changed, 49 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..6fe7ff2d33 --- /dev/null +++ b/.github/workflows/labels.yaml @@ -0,0 +1,49 @@ +name: Conventional Commit Labels +on: + pull_request_target: + types: [opened, synchronize, reopened] + +jobs: + assign-labels: + runs-on: ubuntu-latest + name: Assign labels in pull request + if: github.event.pull_request.merged == false + steps: + - name: Execute assign labels + id: action-assign-labels + uses: mauroalderete/action-assign-labels@v1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + conventional-commits: | + conventional-commits: + - type: 'fix' + nouns: ['FIX', 'Fix', 'fix', 'FIXED', 'Fixed', 'fixed'] + labels: ['fix'] + - type: 'feature' + nouns: ['FEATURE', 'Feature', 'feature', 'FEAT', 'Feat', 'feat'] + labels: ['feature'] + - type: 'build' + nouns: ['BUILD', 'Build', 'build'] + labels: ['build'] + - type: 'chore' + nouns: ['CHORE', 'Chore', 'chore'] + labels: ['chore'] + - type: 'ci' + nouns: ['CI', 'Ci', 'ci'] + labels: ['ci'] + - type: 'docs' + nouns: ['DOCS', 'Docs', 'docs'] + labels: ['documentation'] + - type: 'style' + nouns: ['STYLE', 'Style', 'style'] + labels: ['style'] + - type: 'refactor' + nouns: ['REFACTOR', 'Refactor', 'refactor'] + labels: ['refactor'] + - type: 'perf' + nouns: ['PERF', 'Perf', 'perf'] + labels: ['performance'] + - type: 'test' + nouns: ['TEST', 'Test', 'test'] + labels: ['test'] + \ No newline at end of file