Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Add Conventional Commit Linter #800

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
arielvalentin marked this conversation as resolved.
Show resolved Hide resolved
pull-requests: read
arielvalentin marked this conversation as resolved.
Show resolved Hide resolved

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:
arielvalentin marked this conversation as resolved.
Show resolved Hide resolved
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