Skip to content
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
7 changes: 5 additions & 2 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
types:
- opened
- edited
- reopened
- synchronize
- ready_for_review
Expand All @@ -29,5 +30,7 @@ jobs:
- name: Install npm packages
run: npm ci

- name: Validate PR commits with commitlint
run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --verbose
- name: Lint PR title
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: echo "$PR_TITLE" | npx commitlint --verbose
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ Contributions are very welcome! Just fork the repository, develop in a branch an

## Commit Messages

We follow [conventional commits](https://www.conventionalcommits.org) when writing commit messages.
Commits on the `main` branch should follow [conventional commits](https://www.conventionalcommits.org).
Since we squash-merge pull requests, the PR title should also follow conventional commits
(because it will become the commit message of the squashed commit).
The messages themselves should help future developers understand **why** changes were made.

## Code Style
Expand Down
4 changes: 0 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,5 @@
"@commitlint/cli": "^19.4.0",
"@commitlint/config-conventional": "^19.2.2",
"@commitlint/types": "^19.0.3"
},
"scripts": {
"commitlint:last-commit": "commitlint --from=HEAD~1 --verbose",
"commitlint:merge-base": "commitlint --from=$(git merge-base HEAD main) --verbose"
}
}
Loading