Skip to content

Commit

Permalink
ci: Add Conventional Commit Linter (#800)
Browse files Browse the repository at this point in the history
* ci: Add Conventional Commit Linter

* squash: remove unused action

* squash: Delete commitlint.config.js

* squash: PR feedback

* squash: Update contributing guide

* squash: PR Feedback
  • Loading branch information
arielvalentin authored Feb 8, 2024
1 parent d70068f commit 11ae23d
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
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.yaml
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/commit-me@v1.3.1
env:
FORCE_COLOR: 3
with:
token: ${{ secrets.GITHUB_TOKEN }}
include-commits: false
update-labels: false
config: ".commit-me.json"
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ merging.
All commits to the main repository should follow the
[conventional commit](https://conventionalcommits.org) standard. In a nutshell,
this means commit messages should begin with a semantic tag such as `feat:`,
`fix:`, `docs:`, `tests:`, or `refactor:`. Our release tooling uses these tags
`fix:`, `docs:`, `test:`, `refactor:`, etc... Our release tooling uses these tags
to determine the semantics of your commit, such as how it affects semantic
versioning of the libraries, and to generate changelogs from commit
descriptions. If you are not familiar with conventional commits, please review
Expand Down

0 comments on commit 11ae23d

Please sign in to comment.