mirror of
https://github.com/miniflux/v2.git
synced 2025-06-27 16:36:00 +00:00
ci: add commitlint to validate PR commit messages
This commit is contained in:
parent
7eb1d15315
commit
7bdf133b9d
2 changed files with 25 additions and 4 deletions
8
.github/pull_request_template.md
vendored
8
.github/pull_request_template.md
vendored
|
@ -1,7 +1,7 @@
|
||||||
Do you follow the guidelines?
|
Have you followed these guidelines?
|
||||||
|
|
||||||
- [ ] I have tested my changes
|
- [ ] I have tested my changes
|
||||||
- [ ] There are no breaking changes
|
- [ ] There are no breaking changes
|
||||||
- [ ] I really tested my changes and there is no regression
|
- [ ] I have thoroughly tested my changes and verified there are no regressions
|
||||||
- [ ] Ideally, my commit messages follow the [Conventional Commits specification](https://www.conventionalcommits.org/)
|
- [ ] My commit messages follow the [Conventional Commits specification](https://www.conventionalcommits.org/)
|
||||||
- [ ] I read this document: https://miniflux.app/faq.html#pull-request
|
- [ ] I have read this document: https://miniflux.app/faq.html#pull-request
|
||||||
|
|
21
.github/workflows/linters.yml
vendored
21
.github/workflows/linters.yml
vendored
|
@ -40,3 +40,24 @@ jobs:
|
||||||
with:
|
with:
|
||||||
version: "2024.1.1"
|
version: "2024.1.1"
|
||||||
install-go: false
|
install-go: false
|
||||||
|
|
||||||
|
commitlint:
|
||||||
|
name: Commit Linter
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: "lts/*"
|
||||||
|
|
||||||
|
- name: Install commitlint
|
||||||
|
run: |
|
||||||
|
npm install --save-dev @commitlint/config-conventional @commitlint/cli
|
||||||
|
echo "module.exports = {extends: ['@commitlint/config-conventional']}" > commitlint.config.js
|
||||||
|
|
||||||
|
- name: Validate PR commits
|
||||||
|
run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue