Skip to content

Commit e2f06e9

Browse files
authored
ci: Add GH workflow to validate PR titles follow Conventional Commits.
1 parent f16ab7b commit e2f06e9

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: "pr-title-checks"
2+
3+
on:
4+
pull_request_target:
5+
# NOTE: Workflows triggered by this event give the workflow access to secrets and grant the
6+
# `GITHUB_TOKEN` read/write repository access by default. So we need to ensure:
7+
# - This workflow doesn't inadvertently check out, build, or execute untrusted code from the
8+
# pull request triggered by this event.
9+
# - Each job has `permissions` set to only those necessary.
10+
types: ["edited", "opened", "reopened"]
11+
branches: ["main"]
12+
13+
permissions: {}
14+
15+
concurrency:
16+
group: "${{github.workflow}}-${{github.ref}}"
17+
18+
# Cancel in-progress jobs for efficiency
19+
cancel-in-progress: true
20+
21+
jobs:
22+
conventional-commits:
23+
permissions:
24+
# For amannn/action-semantic-pull-request
25+
pull-requests: "read"
26+
runs-on: "ubuntu-latest"
27+
steps:
28+
- uses: "amannn/action-semantic-pull-request@v5"
29+
env:
30+
GITHUB_TOKEN: "${{secrets.GITHUB_TOKEN}}"

0 commit comments

Comments
 (0)