|
12 | 12 | - synchronize |
13 | 13 |
|
14 | 14 | jobs: |
15 | | - Title: |
| 15 | + Commits: |
| 16 | + name: Conventional Commits |
| 17 | + runs-on: ubuntu-latest |
| 18 | + if: ${{ github.event_name == 'pull_request' }} |
| 19 | + |
16 | 20 | permissions: |
| 21 | + contents: read |
17 | 22 | pull-requests: read |
18 | 23 |
|
19 | | - if: ${{ github.event_name == 'pull_request' }} |
20 | | - name: Check Title |
21 | | - runs-on: ubuntu-latest |
22 | | - |
23 | 24 | steps: |
24 | | - - name: Check |
25 | | - uses: beam-community/actions-pr-title@v1.0.0 |
| 25 | + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 |
26 | 26 | with: |
27 | | - regex: '^(refactor!|feat!|fix!|refactor|fix|feat|chore)(\(\w+\))?:\s(\[#\d{1,5}\])?.*$' |
28 | | - hint: | |
29 | | - Your PR title does not match the Conventional Commits convention. Please rename your PR to match one of the following formats: |
| 27 | + fetch-depth: 0 |
30 | 28 |
|
31 | | - fix: [#123] some title of the PR |
32 | | - fix(scope): [#123] some title of the PR |
33 | | - feat: [#1234] some title of the PR |
34 | | - chore: update some action |
| 29 | + - uses: wagoid/commitlint-github-action@b948419dd99f3fd78a6548d48f94e3df7f6bf3ed # v6 |
| 30 | + with: |
| 31 | + configFile: .commitlintrc.yml |
35 | 32 |
|
36 | | - Note: Adding ! (i.e. `feat!:`) represents a breaking change and will result in a SemVer major release. |
| 33 | + Labels: |
| 34 | + name: Assign Labels |
| 35 | + runs-on: ubuntu-latest |
| 36 | + if: ${{ github.event_name == 'pull_request' }} |
37 | 37 |
|
38 | | - Please use one of the following types: |
| 38 | + permissions: |
| 39 | + contents: read |
| 40 | + pull-requests: write |
39 | 41 |
|
40 | | - - **feat:** A new feature, resulting in a MINOR version bump. |
41 | | - - **fix:** A bug fix, resulting in a PATCH version bump. |
42 | | - - **refactor:** A code change that neither fixes a bug nor adds a feature. |
43 | | - - **chore:** Changes unrelated to the release code, resulting in no version bump. |
44 | | - - **revert:** Reverts a previous commit. |
| 42 | + steps: |
| 43 | + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 |
45 | 44 |
|
46 | | - See https://www.conventionalcommits.org/en/v1.0.0/ for more information. |
| 45 | + - uses: mauroalderete/action-assign-labels@671a4ca2da0f900464c58b8b5540a1e07133e915 # v1 |
| 46 | + with: |
| 47 | + pull-request-number: ${{ github.event.pull_request.number }} |
| 48 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 49 | + conventional-commits: | |
| 50 | + conventional-commits: |
| 51 | + - type: 'fix' |
| 52 | + nouns: ['FIX', 'Fix', 'fix'] |
| 53 | + labels: ['bug'] |
| 54 | + - type: 'feature' |
| 55 | + nouns: ['FEAT', 'Feat', 'feat'] |
| 56 | + labels: ['feature'] |
| 57 | + - type: 'chore' |
| 58 | + nouns: ['CHORE', 'Chore', 'chore'] |
| 59 | + labels: ['chore'] |
| 60 | + - type: 'docs' |
| 61 | + nouns: ['DOCS', 'Docs', 'docs'] |
| 62 | + labels: ['documentation'] |
| 63 | + - type: 'ci' |
| 64 | + nouns: ['CI', 'Ci', 'ci'] |
| 65 | + labels: ['ci'] |
0 commit comments