Skip to content

Commit 15b39ff

Browse files
kaylareopellemwear
andauthored
ci: Add conventional commits validation (#1693)
Validate pull request titles to ensure they adhere to conventional commits. This matches the validation performed in contrib. Co-authored-by: Matthew Wear <matthew.wear@gmail.com>
1 parent 75502b6 commit 15b39ff

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

.commit-me.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"include-pull-requests": true,
3+
"types": [ "chore", "ci", "docs", "feat", "fix", "perf", "refactor", "release", "revert", "squash", "style", "test" ]
4+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Conventional Commits Validation
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
types:
7+
- opened
8+
- synchronize
9+
- reopened
10+
- edited
11+
12+
permissions:
13+
contents: read
14+
pull-requests: read
15+
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }} # Ensure that only one instance of this workflow is running per Pull Request
18+
cancel-in-progress: true # Cancel any previous runs of this workflow
19+
20+
jobs:
21+
validate-commits:
22+
name: Conventional Commits Validation
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: dev-build-deploy/commit-me@v1.5.0
26+
env:
27+
FORCE_COLOR: 3
28+
with:
29+
token: ${{ secrets.GITHUB_TOKEN }}
30+
include-commits: false
31+
update-labels: false
32+
config: ".commit-me.json"

0 commit comments

Comments
 (0)