Skip to content

Commit

Permalink
ci: add conventional commit lint check to PR titles (#1420)
Browse files Browse the repository at this point in the history
* Add conventional commit lint check to PR titles

* Document PR title requirement
  • Loading branch information
calumcalder authored Jan 6, 2025
1 parent 60c992b commit b9b5c6f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Lint PR Title

on:
pull_request:
types: [opened, synchronize, edited]

jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Install commitizen"
run: pip install --user -U commitizen
- name: "Lint the PR title"
env:
TITLE: ${{ github.event.pull_request.title }}
run: echo "${TITLE}" | cz check
8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,11 @@ that's welcome).

All submissions, including submissions by project members, require review. We
use GitHub pull requests for this purpose.

### PR Titles

To automate releases we require that PRs are titled according to
[conventional commits](https://conventionalcommits.org); i.e. that they
are tagged like `fix: handle exception XYZ correctly`, or
`feat: implement new video exporter`. See the conventional commits documentation
for more details.

0 comments on commit b9b5c6f

Please sign in to comment.