Skip to content

Commit 130c51d

Browse files
authored
ci: introduce semantic-pr (#21)
1 parent 810673c commit 130c51d

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/semantic-pr.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Semantic PR
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- edited
8+
- synchronize
9+
10+
permissions:
11+
pull-requests: read
12+
13+
jobs:
14+
validate:
15+
name: Validate PR Title
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: amannn/action-semantic-pull-request@v5
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
with:
22+
# Configure which types are allowed (https://github.com/commitizen/conventional-commit-types)
23+
types: |
24+
fix
25+
feat
26+
docs
27+
style
28+
refactor
29+
perf
30+
test
31+
build
32+
ci
33+
chore
34+
revert
35+
# Configure which scopes are allowed (optional)
36+
# scopes: |
37+
# core
38+
# msgs
39+
# tests
40+
# Require a scope to be provided
41+
requireScope: false
42+
# Disable validation of commits (only validate PR title)
43+
validateSingleCommit: false
44+
# Allow subject to start with uppercase
45+
subjectPattern: ^(?![A-Z]).+$
46+
subjectPatternError: |
47+
The subject "{subject}" found in the pull request title "{title}"
48+
didn't match the configured pattern. Please ensure that the subject
49+
doesn't start with an uppercase character.

0 commit comments

Comments
 (0)