Skip to content

Commit

Permalink
ci: Add Conventional Commit Linter
Browse files Browse the repository at this point in the history
I have made too many mistakes approving and merging PRs that lack conventional commits.

This Action should mitigate those mistakes going forward.
  • Loading branch information
arielvalentin committed Jan 11, 2024
1 parent 8b0c63e commit a4305cb
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/conventional-commits.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Conventional Commits Validation

on:
workflow_dispatch:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
- reopened
- edited

permissions:
contents: write
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/commit-me@v1.2.0
with:
update-labels: false # OPTIONAL; do not update the Pull Request labels based on the Conventional Commits information.
include-commits: true
token: ${{ secrets.GITHUB_TOKEN }}
types: |
chore
ci
docs
feat
fix
perf
refactor
release
squash
test

0 comments on commit a4305cb

Please sign in to comment.