ci: enforce conventional PR titles via GitHub Action

This commit is contained in:
Amanda Sternberg 2025-09-25 08:31:08 +02:00
parent 539054c34d
commit e89c694f97
3 changed files with 37 additions and 0 deletions

30
.github/workflows/semantic-pr.yml vendored Normal file
View file

@ -0,0 +1,30 @@
name: Check PR title (conventional)
on:
pull_request:
types: [opened, edited, synchronize, reopened, ready_for_review]
jobs:
semantic:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: |
feat
fix
docs
style
refactor
perf
test
build
ci
chore
revert
requireScope: false
subjectPattern: '^[^\s].+'
wip: true

View file

@ -242,6 +242,7 @@ Lee Doughty <32392044+leedoughty@users.noreply.github.com>
memchr <memchr@proton.me>
Max Romanowski <maxr777@proton.me>
Aldlss <ayaldlss@gmail.com>
Amanda Sternberg <mandis.sternberg@gmail.com>
********************

View file

@ -24,6 +24,12 @@ For more information on building and developing, please see [Development](./docs
Want to contribute to Anki? Check out the [Contribution Guidelines](./docs/contributing.md).
When opening a pull request, please make sure the PR title follows the
[Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) style.
Examples:
- `feat: add new learning mode`
- `fix: avoid crash when merging notetypes`
### Anki Contributors
[CONTRIBUTORS](./CONTRIBUTORS)