generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 11
48 lines (45 loc) · 1.38 KB
/
pr-title.yml
File metadata and controls
48 lines (45 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Validate PR Title
on:
pull_request_target:
branches: [main]
types: [opened, edited, synchronize, reopened]
permissions:
statuses: write
jobs:
validate-pr-title:
runs-on: ubuntu-latest
permissions:
pull-requests: read
steps:
- uses: amannn/action-semantic-pull-request@v6.1.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# Types aligned with this repo's commit conventions (see AGENTS.md)
types: |
feat
fix
docs
style
refactor
perf
test
build
ci
chore
revert
requireScope: false
# Repo convention: lowercase subjects (e.g., "feat: add new command")
subjectPattern: ^[a-z].+$
subjectPatternError: |
The subject "{subject}" found in the pull request title "{title}"
must start with a lowercase letter.
Example: "feat: add deploy command"
# Validate the commit message when a PR has a single commit, since
# GitHub suggests using it as the merge commit message on squash-merge
validateSingleCommit: true
validateSingleCommitMatchesPrTitle: true
# Skip validation for bot/dependency PRs
ignoreLabels: |
bot
dependencies