Skip to content

Commit 0de7242

Browse files
authored
ci: require semantic PR titles (#45)
1 parent 80c5e6c commit 0de7242

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Require semantic PR title
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- edited
8+
- synchronize
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.head_ref || github.sha }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
check:
16+
runs-on: ubuntu-latest
17+
steps:
18+
# Accepted types: https://github.com/commitizen/conventional-commit-types/blob/master/index.json
19+
- uses: amannn/[email protected]
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
with:
23+
# Reason from action docs:
24+
# When using "Squash and merge" on a PR with only one commit, GitHub
25+
# will suggest using that commit message instead of the PR title for the
26+
# merge commit, and it's easy to commit this by mistake. Enable this option
27+
# to also validate the commit message for one commit PRs.
28+
validateSingleCommit: true

0 commit comments

Comments
 (0)