Linked Issues
CodeRabbit provides intelligent assessment of linked issues to validate whether pull requests properly address their requirements. This guide explains how to effectively use linked issues and write clear issue descriptions for optimal results.
Understanding Linked Issues
A linked issue is one that is explicitly referenced in your pull request description using platform-specific syntax:
- GitHub:
fixes #123
,closes #123
,resolves #123
- GitLab:
closes #123
,fixes #123
, or full URLs - Jira/Linear: Full URLs to tickets
When CodeRabbit detects linked issues, it analyzes them against your pull request changes to determine if the requirements are met:
Best Practices for Issue Writing
Issue Titles
Create descriptive, technical titles that clearly state the goal:
✅ Good Examples:
- "Add PrismaLint integration to configuration flow"
- "Fix race condition in user authentication"
- "Implement caching for GraphQL queries"
❌ Poor Examples:
- "Fix bug"
- "Update code"
- "Improve performance"
Issue Descriptions
Write comprehensive descriptions that provide clear technical context:
-
Problem Statement
- Clearly describe what needs to be changed
- Include technical details about affected components
- Reference specific files or functions if known
-
Expected Solution
- Outline the desired implementation approach
- Include code examples or pseudo-code when relevant
- List specific acceptance criteria
Example Description:
Problem:
The configuration system doesn't validate Prisma schema files before deployment,
leading to potential runtime errors.
Solution:
Integrate PrismaLint into the configuration flow to:
- Validate schema files during PR checks
- Enforce consistent naming conventions
- Prevent common Prisma anti-patterns
Affected Components:
- Configuration validation pipeline
- CI/CD workflow
- Schema validation logic
Acceptance Criteria:
- [ ] PrismaLint runs on all PR checks
- [ ] Failed validations block merging
- [ ] Clear error messages for schema issues
Consistent Terminology
Use consistent terminology between issues and pull requests:
✅ Good:
- Use the same technical terms consistently
- Reference components with their exact names
- Maintain consistent naming patterns
❌ Poor:
- Mixing different terms for the same component
- Using vague or non-technical language
- Inconsistent capitalization or formatting
Linking Issues Effectively
In Pull Requests
-
Direct References
Fixes #123
Resolves organization/repo#456
Closes https://github.com/org/repo/issues/789 -
Multiple Issues
This PR addresses:
- Fixes #123
- Closes #456
- Resolves https://jira.company.com/browse/PROJ-789
Cross-References
For better traceability:
- Add PR references in issue comments
- Use complete URLs when linking external systems
- Maintain bidirectional links between related issues
How CodeRabbit Assesses Linked Issues
CodeRabbit evaluates linked issues by:
- Analyzing issue titles and descriptions
- Comparing changes in the pull request
- Validating if requirements are met
- Providing an assessment with:
- ✅: If the objective has been addressed in the PR. The 'Explanation' column will be left blank.
- ❌: If the objective has not been addressed in the PR. Here a brief explanation is added to the 'Explanation' column.
- ❓: If it is unclear whether the objective has been addressed. Here a brief explanation is added to the 'Explanation' column.
Only the issue title and description are considered in the assessment. Comments and discussion threads are not currently analyzed.
Tips for Better Assessments
-
Be Specific
- Include clear, measurable objectives
- List specific technical requirements
- Reference affected code components
-
Provide Context
- Explain why changes are needed
- Document current behavior
- Describe expected outcomes
-
Use Technical Details
- Include file paths when known
- Reference specific functions or classes
- Mention relevant technologies
-
Keep It Focused
- One main objective per issue
- Clear scope boundaries
- Specific acceptance criteria