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
name: Lint PR
# Validate PR titles against Conventional Commits. The squash-merged PR
# title becomes the commit message that release-plz uses to generate the
# changelog and determine the next version, so a conventional title keeps
# the changelog readable.
#
# This check is advisory: it is not a required status check, so it does not
# block merging. PR titles can also be adjusted in the merge dialog when
# squashing. Dependabot PRs (labelled `dependencies`) and release-plz PRs
# (labelled `release`) are exempt, as are draft PRs.
on:
pull_request_target:
types:
permissions:
pull-requests: read
jobs:
conventional-commits:
name: Conventional Commits
# Skip draft (work-in-progress) PRs; they are validated once marked
# ready for review.
if: ${{ !github.event.pull_request.draft }}
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v6
with:
# Allowed commit types. Breaking changes are marked with `!`
# after the type or scope, e.g. `feat(quat)!: remove deprecated
# API`; a scope is optional, e.g. `fix(vec3): correct typo`.
# The Keep a Changelog types (changed/deprecated/removed/security)
# map to changelog sections via the `[changelog]` commit parsers.
types: |
feat
fix
refactor
perf
docs
test
chore
style
ci
build
revert
changed
deprecated
removed
security
ignoreLabels: |
dependencies # dependabot PRs
release # release-plz PRs ("Prepare <version> release")
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}