fix: Validate that an issue is linked in PR description#7719
fix: Validate that an issue is linked in PR description#7719c-warren wants to merge 1 commit intocadence-workflow:masterfrom
Conversation
Code Review 👍 Approved with suggestions 0 resolved / 1 findingsWell-structured Gitar rule with clear validation logic and sensible skip conditions. One minor suggestion to add 💡 Edge Case: Missing
|
| Auto-apply | Verbose |
|
|
Was this helpful? React with 👍 / 👎 | Gitar
| - Example: Quick typo fixes, minor documentation updates | ||
|
|
||
| ### 2. Maintenance Commits | ||
| PRs with titles starting with these conventional commit prefixes are exempt: |
There was a problem hiding this comment.
💡 Edge Case: Missing revert: from exempt maintenance commit prefixes
The maintenance commit prefixes (docs:, chore:, ci:, style:) don't include revert:, which was recently added to the project's valid commit types (see commit 32ed638 — chore: add revert to commit types). Reverts are typically urgent rollbacks that shouldn't require issue linking since they're undoing a previous change that already has its own issue context. Similarly, test: is a common conventional commit prefix for test-only changes that may not warrant an issue link.
Consider adding revert: (and optionally test:) to the exempt prefixes list.
Suggested fix:
PRs with titles starting with these conventional commit prefixes are exempt:
- `docs:` - Documentation changes
- `chore:` - Maintenance tasks, dependency updates
- `ci:` - CI/CD configuration changes
- `style:` - Code formatting or style changes
- `revert:` - Reverts of previous changes
Was this helpful? React with 👍 / 👎
|
gitar display:verbose |
What changed?
Validates whether the PR description contains a relevant GitHub issue.
Why?
We are aiming to improve the transparency of documentation, ease the process for creating new releases, and improve the context given to a reviewer for a PR. Adding an issue link reduces the need for duplication of reasoning (the issue should document part of the "why" for a given PR) and makes it easier for the release engineer to identify which commits relate to which issues.
We're using a gitar rule because:
Unfortunately the gitar rule will be more expensive (an LLM request per PR update) and less deterministic. We will reevaluate as we test other actions.
How did you test it?
Tested via this PR and its integration with gitar.
Potential risks
None.
Release notes
N/A
Documentation Changes
N/A
Reviewer Validation
PR Description Quality (check these before reviewing code):
go testinvocation)