forked from OpenDataEnsemble/ode
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (55 loc) · 1.97 KB
/
pr-title-check.yml
File metadata and controls
63 lines (55 loc) · 1.97 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Validate PR Title
on:
pull_request:
types: [opened, edited, synchronize, reopened]
permissions:
pull-requests: write
contents: read
jobs:
pr-title:
name: Validate PR Title Format
runs-on: ubuntu-latest
steps:
- name: Check PR Title Format
uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# Allowed commit types matching our Conventional Commits specification
types: |
feat
fix
docs
style
refactor
perf
test
build
ci
chore
revert
# Require scope (optional but recommended)
requireScope: false
# Allow breaking changes indicator
allowMergeCommits: false
# Custom validation pattern (optional)
# This enforces: <type>(<scope>): <subject>
subjectPattern: ^.+$
subjectPatternError: |
The subject must be a non-empty string.
See https://www.conventionalcommits.org/ for more information.
# Wording for the PR title
# This will be used in the status check message
titleWording: |
The PR title must follow the Conventional Commits format:
`<type>(<scope>): <subject>`
Examples:
- feat(auth): add OAuth2 login
- fix(ui): resolve button alignment issue
- docs: update installation guide
See [CONTRIBUTING.md](CONTRIBUTING.md#commit-message-convention) for details.
# Wording for the PR title when it's invalid
titleWordingFail: |
The PR title does not follow the Conventional Commits format.
Please update the title to match: `<type>(<scope>): <subject>`
See [CONTRIBUTING.md](CONTRIBUTING.md#commit-message-convention) for details.