docs: update PR template to follow conventional commits#184
Conversation
Improve PR template with conventional commit guidance for titles and descriptions, including type/scope format, examples, and best practices for commit messages. Replace generic type checkboxes with more explicit conventional commit instructions. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Greptile SummaryThis PR updates
Confidence Score: 4/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Contributor opens a new PR] --> B[GitHub loads pull_request_template.md]
B --> C[Editor view: HTML comments visible\nContributor reads conventional commit guidance]
C --> D{Follows conventional\ncommit format?}
D -- Yes --> E[type scope : description\ne.g. feat cli : add --verbose flag]
D -- No --> F[Revise title using\nTypes: feat fix docs style refactor\nperf test build ci chore]
F --> E
E --> G[Fill in ## Description\nusing imperative mood]
G --> H[Fill in ## Changes bullet list]
H --> I[Fill in ## Testing notes]
I --> J{Checklist\nPR title follows\nconventional commit format?}
J -- Checked --> K[Submit PR]
J -- Not checked --> L[Fix title or description\nthen re-check]
L --> J
K --> M[Reviewer sees rendered PR body\nNote: PR Title heading appears\nas empty section after submission]
Last reviewed commit: d402869 |
| ## PR Title | ||
|
|
||
| <!-- Brief description of what this PR does and why --> | ||
| <!-- | ||
| Use conventional commit format for the PR title: | ||
|
|
||
| <type>(<scope>): <short description> | ||
|
|
||
| Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore | ||
| Scope is optional but encouraged (e.g., cli, api, config) | ||
|
|
||
| Examples: | ||
| feat(cli): add --verbose flag for debug output | ||
| fix(api): handle null response from provider | ||
| docs: update README with setup instructions | ||
| --> |
There was a problem hiding this comment.
## PR Title section renders as empty heading in submitted PR
The ## PR Title section, along with its guidance comment, will only be visible in the PR editor — once a PR is submitted, the HTML comment is stripped and the heading ## PR Title is left as an empty, orphaned section in the rendered PR body. This can look confusing to reviewers reading the submitted PR.
Since PR title guidance is already reinforced by the new checklist item (- [ ] PR title follows conventional commit format), consider removing the ## PR Title heading entirely and keeping only the HTML comment as a freestanding hint at the top of the template — or simply rely on the checklist item alone.
| ## PR Title | |
| <!-- Brief description of what this PR does and why --> | |
| <!-- | |
| Use conventional commit format for the PR title: | |
| <type>(<scope>): <short description> | |
| Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore | |
| Scope is optional but encouraged (e.g., cli, api, config) | |
| Examples: | |
| feat(cli): add --verbose flag for debug output | |
| fix(api): handle null response from provider | |
| docs: update README with setup instructions | |
| --> | |
| <!-- | |
| Use conventional commit format for the PR title: | |
| <type>(<scope>): <short description> | |
| Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore | |
| Scope is optional but encouraged (e.g., cli, api, config) | |
| Examples: | |
| feat(cli): add --verbose flag for debug output | |
| fix(api): handle null response from provider | |
| docs: update README with setup instructions | |
| --> | |
| ## Description |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| ## Description | ||
|
|
||
| <!-- | ||
| Explain what this PR does and why. Use conventional commit style: | ||
|
|
||
| - Start with the imperative mood (e.g., "add", "fix", "remove", not "added", "fixes") | ||
| - First line: concise summary of the change | ||
| - Body: motivation, context, and details of the approach | ||
|
|
||
| If this is a breaking change, start the body with "BREAKING CHANGE:" and explain the impact. | ||
| --> |
There was a problem hiding this comment.
## Description section missing a fill-in placeholder
Unlike ## Changes and ## Testing, the ## Description section has no placeholder text (e.g., a - or a short prompt) below the comment. The comment itself is hidden after submission, so if a contributor never replaces it, the section silently renders as empty. Adding a minimal placeholder makes it clear that content is expected here.
| ## Description | |
| <!-- | |
| Explain what this PR does and why. Use conventional commit style: | |
| - Start with the imperative mood (e.g., "add", "fix", "remove", not "added", "fixes") | |
| - First line: concise summary of the change | |
| - Body: motivation, context, and details of the approach | |
| If this is a breaking change, start the body with "BREAKING CHANGE:" and explain the impact. | |
| --> | |
| ## Description | |
| <!-- | |
| Explain what this PR does and why. Use conventional commit style: | |
| - Start with the imperative mood (e.g., "add", "fix", "remove", not "added", "fixes") | |
| - First line: concise summary of the change | |
| - Body: motivation, context, and details of the approach | |
| If this is a breaking change, start the body with "BREAKING CHANGE:" and explain the impact. | |
| --> | |
Update the pull request template to enforce conventional commit format for titles and descriptions. This includes clear guidance on commit types, scope, imperative mood, and provides examples to help contributors write better PR titles and messages.
The template now removes generic checkboxes in favor of explicit conventional commit instructions, making it easier for contributors to follow the project's standards.
Changes
Testing
Tested locally with this PR