Skip to content

Commit

Permalink
ci: Add conventional commits validation
Browse files Browse the repository at this point in the history
Validate pull request titles to ensure they adhere to conventional
commits. This matches the validation performed in contrib.
  • Loading branch information
kaylareopelle committed Aug 28, 2024
1 parent 21717b5 commit 58635f5
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .commit-me.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"include-pull-requests": true,
"types": [ "chore", "ci", "docs", "feat", "fix", "perf", "refactor", "release", "revert", "squash", "style", "test" ]
}
32 changes: 32 additions & 0 deletions .github/workflows/conventional-commits.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Conventional Commits Validation

on:
workflow_dispatch:
pull_request:
types:
- opened
- synchronize
- reopened
- edited

permissions:
contents: read
pull-requests: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }} # Ensure that only one instance of this workflow is running per Pull Request
cancel-in-progress: true # Cancel any previous runs of this workflow

jobs:
validate-commits:
name: Conventional Commits Validation
runs-on: ubuntu-latest
steps:
- uses: dev-build-deploy/[email protected]
env:
FORCE_COLOR: 3
with:
token: ${{ secrets.GITHUB_TOKEN }}
include-commits: false
update-labels: false
config: ".commit-me.json"

0 comments on commit 58635f5

Please sign in to comment.