docs: add PR issue closing syntax guidance#252
Conversation
Add NEVER rule and clarify ALWAYS rule to prevent GitHub's auto-close syntax limitation where comma-separated issues (Closes #1, #2, #3) only closes the first issue. Closes #153 Closes #154 Closes #155 Closes #156 Closes #157 Closes #158 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Summary of ChangesHello @joshsmithxrm, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request updates the documentation to provide clearer guidance on the correct syntax for closing multiple GitHub issues from a pull request. The changes aim to prevent a common mistake where only the first issue is automatically closed when using comma-separated issue numbers in Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Pull request overview
This PR adds documentation guidance to prevent incorrect usage of GitHub's issue closing syntax, specifically addressing the problem where comma-separated issue numbers in a Closes statement only auto-close the first issue.
- Added a NEVER rule prohibiting comma-separated issues in
Closesstatements - Updated the ALWAYS rule to clarify that separate
Closes #Nlines must be used per issue
There was a problem hiding this comment.
Code Review
This pull request adds important guidance to the project's contribution documentation (CLAUDE.md) regarding the correct syntax for closing GitHub issues in pull request descriptions. The change correctly points out that comma-separated lists of issues in a Closes statement do not work as expected and that separate Closes #N lines should be used instead. My review includes one suggestion to refine the wording in the ALWAYS table to improve clarity, avoid redundancy with the new NEVER rule, and maintain the generality of the original rule, which aligns with the repository's guidelines for concise and directive documentation, especially for AI readers.
| | Include ErrorCode in `PpdsException` | Enables programmatic handling (retry, re-auth) (ADR-0026) | | ||
| | Make new user data accessible via `ppds serve` | VS Code extension needs same data as CLI/TUI | | ||
| | Link related issues in PR body | Use "Closes #123" or "Relates to #456" | | ||
| | Link related issues in PR body | Use separate `Closes #N` per issue; comma syntax only closes first | |
There was a problem hiding this comment.
The new NEVER rule on line 23 is a great addition and clearly explains the anti-pattern.
For this ALWAYS rule, the updated explanation becomes slightly redundant with the NEVER rule. It also loses the generality of the original guidance, which included non-closing keywords like Relates to.
To improve clarity and conciseness, I suggest a version that incorporates both aspects: general linking and the specific instruction for closing multiple issues. This approach keeps the detailed failure case (comma syntax only closes first) in the NEVER table, where it's most impactful, avoiding repetition.
| | Link related issues in PR body | Use separate `Closes #N` per issue; comma syntax only closes first | | |
| | Link related issues in PR body | Use `Closes #N` or `Relates to #N`. For multiple issues, use separate `Closes #N` lines. | |
References
- When documenting principles, prefer conciseness. Avoid adding redundant text if the existing wording already captures the essence of the principle, even if it's less explicit.
- For documentation intended for an AI reader, prioritize concise, directive phrasing that is consistent with existing formats over separating patterns from their rationale.
Summary
ClosesstatementCloses #Nlines per issueBackground
PR #243 intended to close 7 issues (#152-158) but only #152 was auto-closed because GitHub's syntax
Closes #152, #153, #154...only recognizes the first issue.Issues #153-158 have been manually closed with comments referencing PR #243.
Changes
NEVER table:
ALWAYS table (updated):
Test plan
ppds plugintraces getcommand #153-158 referencing PR feat: add plugin traces CLI commands #243🤖 Generated with Claude Code