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
20 changes: 20 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!--
Use a Conventional Commit prefix in the PR title so Release Please knows
which version to propose:

fix: correct token refresh -> patch release (2.1.1 to 2.1.2)
feat: add topic management -> minor release (2.1.1 to 2.2.0)
feat!: remove legacy API -> major release (2.1.1 to 3.0.0)

Other accepted prefixes that do not normally trigger a release:
docs:, test:, ci:, chore:, build:, refactor:, perf:, style:, revert:
Optional scopes are supported, for example: fix(auth): refresh expired tokens
-->

## Summary

<!-- What changed, and why? -->

## Testing

<!-- How was this tested? -->
27 changes: 27 additions & 0 deletions .github/workflows/pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Validate PR title

on:
pull_request:
types:
- opened
- edited
- synchronize
- reopened

permissions:
contents: read

jobs:
conventional-title:
runs-on: ubuntu-latest
steps:
- name: Check Conventional Commit prefix
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: |
pattern='^(fix|feat|docs|test|ci|chore|build|refactor|perf|style|revert)(\([[:alnum:]_.-]+\))?!?: .+'

if [[ ! "$PR_TITLE" =~ $pattern ]]; then
echo "::error::PR title must start with a Conventional Commit prefix. Examples: 'fix: correct token refresh', 'feat: add topic management', or 'feat!: remove legacy API'."
exit 1
fi