|
| 1 | +name: "Semantic pull requests" |
| 2 | + |
| 3 | +on: pull_request |
| 4 | + |
| 5 | +jobs: |
| 6 | + main: |
| 7 | + name: Validate PR title |
| 8 | + runs-on: ubuntu-latest |
| 9 | + steps: |
| 10 | + - uses: amannn/action-semantic-pull-request@v4 |
| 11 | + env: |
| 12 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 13 | + with: |
| 14 | + types: | |
| 15 | + fix |
| 16 | + feat |
| 17 | + chore |
| 18 | + refactor |
| 19 | + exp |
| 20 | + doc |
| 21 | + test |
| 22 | + requireScope: false |
| 23 | + subjectPattern: ^(?![A-Z]).+$ |
| 24 | + subjectPatternError: | |
| 25 | + The subject "{subject}" found in the pull request title "{title}" |
| 26 | + didn't match the configured pattern. Please ensure that the subject |
| 27 | + doesn't start with an uppercase character. |
| 28 | + # For work-in-progress PRs you can typically use draft pull requests |
| 29 | + # from GitHub. However, private repositories on the free plan don't have |
| 30 | + # this option and therefore this action allows you to opt-in to using the |
| 31 | + # special "[WIP]" prefix to indicate this state. This will avoid the |
| 32 | + # validation of the PR title and the pull request checks remain pending. |
| 33 | + # Note that a second check will be reported if this is enabled. |
| 34 | + wip: true |
| 35 | + # When using "Squash and merge" on a PR with only one commit, GitHub |
| 36 | + # will suggest using that commit message instead of the PR title for the |
| 37 | + # merge commit, and it's easy to commit this by mistake. Enable this option |
| 38 | + # to also validate the commit message for one commit PRs. |
| 39 | + validateSingleCommit: true |
| 40 | + # Related to `validateSingleCommit` you can opt-in to validate that the PR |
| 41 | + # title matches a single commit to avoid confusion. |
| 42 | + validateSingleCommitMatchesPrTitle: true |
| 43 | + # If the PR contains one of these labels, the validation is skipped. |
| 44 | + # Multiple labels can be separated by newlines. |
| 45 | + # If you want to rerun the validation when labels change, you might want |
| 46 | + # to use the `labeled` and `unlabeled` event triggers in your workflow. |
| 47 | + ignoreLabels: | |
| 48 | + bot |
| 49 | + dependencies |
0 commit comments