| 1 | name: "Pull Request Triage" |
| 2 | |
| 3 | on: # zizmor: ignore[dangerous-triggers] Uses pull_request_target only for trusted metadata checks and PR assignment, not to check out or execute PR code. |
| 4 | pull_request_target: |
| 5 | types: |
| 6 | - opened |
| 7 | - edited |
| 8 | - synchronize |
| 9 | |
| 10 | permissions: |
| 11 | contents: read |
| 12 | |
| 13 | jobs: |
| 14 | assign_author: |
| 15 | name: "Assign Author to PR" |
| 16 | # https://github.com/marketplace/actions/auto-author-assign |
| 17 | runs-on: ubuntu-latest |
| 18 | permissions: |
| 19 | contents: read |
| 20 | issues: write |
| 21 | pull-requests: write |
| 22 | steps: |
| 23 | - uses: toshimaru/auto-author-assign@3e19bfc990cb1cf0589dce95e9f75289bb1e22de # v3.0.3 |
| 24 | with: |
| 25 | repo-token: "${{ secrets.GITHUB_TOKEN }}" |
| 26 | |
| 27 | check_pr_semantic: |
| 28 | runs-on: ubuntu-latest |
| 29 | permissions: |
| 30 | contents: read |
| 31 | pull-requests: read |
| 32 | steps: |
| 33 | # Please look up the latest version from |
| 34 | # https://github.com/amannn/action-semantic-pull-request/releases |
| 35 | - uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1 |
| 36 | env: |
| 37 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 38 | with: |
| 39 | # Configure which types are allowed. |
| 40 | # Default: https://github.com/commitizen/conventional-commit-types |
| 41 | # Updated as part of PR 1930 |
| 42 | types: | |
| 43 | feat |
| 44 | fix |
| 45 | cut |
| 46 | doc |
| 47 | ci |
| 48 | bump |
| 49 | test |
| 50 | refactor |
| 51 | revert |
| 52 | make |
| 53 | chore |
| 54 | # Configure which scopes are allowed. |
| 55 | scopes: | |
| 56 | anta |
| 57 | anta.tests |
| 58 | anta.cli |
| 59 | # Configure that a scope must always be provided. |
| 60 | requireScope: false |
| 61 | # Configure additional validation for the subject based on a regex. |
| 62 | # This example ensures the subject doesn't start with an uppercase character. |
| 63 | # subjectPattern: ^(?![A-Z]).+$ |
| 64 | # If `subjectPattern` is configured, you can use this property to override |
| 65 | # the default error message that is shown when the pattern doesn't match. |
| 66 | # The variables `subject` and `title` can be used within the message. |
| 67 | subjectPatternError: | |
| 68 | The subject "{subject}" found in the pull request title "{title}" |
| 69 | didn't match the configured pattern. Please ensure that the subject |
| 70 | doesn't start with an uppercase character. |
| 71 | # When using "Squash and merge" on a PR with only one commit, GitHub |
| 72 | # will suggest using that commit message instead of the PR title for the |
| 73 | # merge commit, and it's easy to commit this by mistake. Enable this option |
| 74 | # to also validate the commit message for one commit PRs. |
| 75 | # Update 13-Jul-2022 CH: GitHub now offers a toggle for this behavior. |
| 76 | # We have set that to always use the PR title, so this check is no longer needed. |
| 77 | validateSingleCommit: false |
| 78 | # Related to `validateSingleCommit` you can opt-in to validate that the PR |
| 79 | # title matches a single commit to avoid confusion. |
| 80 | validateSingleCommitMatchesPrTitle: true |
| 81 | ignoreLabels: | |
| 82 | bot |
| 83 | ignore-semantic-pull-request |