.gitar/rules/issue-linking-required.md
This rule ensures that pull requests link to GitHub issues from the cadence-workflow organization, providing better tracking, context, and historical linkage between code changes and their motivations.
When evaluating a pull request:
The issue linking requirement is automatically skipped when ANY of these conditions are true:
PRs with titles starting with these conventional commit prefixes are exempt:
docs: - Documentation changeschore: - Maintenance tasks, dependency updatesci: - CI/CD configuration changesstyle: - Code formatting or style changesrevert: - Pull Request RevertsExamples:
docs: Update installation instructionschore: Bump dependency versionsci: Add new workflow for releasestyle: Apply consistent formattingfeat: Add new authentication methodfix: Resolve memory leak in worker[bot]dependabot[bot], renovate[bot], github-actions[bot]Search the PR description body only for issue references in these formats:
Same repository short format:
#123Cross-repository format:
cadence-workflow/other-repo#123cadence-workflow organizationFull URL format:
https://github.com/cadence-workflow/cadence/issues/123https://github.com/cadence-workflow/other-repo/issues/456cadence-workflow organizationother-org/repo#123CRITICAL: All issue links must reference the cadence-workflow organization.
How to validate:
#123) is implicitly within cadence-workflow if the PR is in a cadence-workflow repocadence-workflow/github.com/cadence-workflow/Examples:
#123 (in cadence-workflow repo)cadence-workflow/web#45https://github.com/cadence-workflow/cadence/issues/789external-org/repo#123https://github.com/other-org/repo/issues/1231. Get PR diff stats
2. Calculate total_lines = additions + deletions
3. If total_lines < 50, skip and approve
4. Get PR title
5. If title starts with "docs:", "chore:", "ci:", or "style:", skip and approve
6. Get PR author username
7. If author ends with "[bot]", skip and approve
1. Get PR description body
2. Search for patterns:
- #\d+
- cadence-workflow/[\w-]+#\d+
- https://github.com/cadence-workflow/[\w-]+/issues/\d+
3. For each match, extract organization name
4. Validate organization is "cadence-workflow"
Report as part of all rules.
cadence-workflow, Cadence-Workflow, and CADENCE-WORKFLOW are all validThis rule is complementary to the existing pr-description-quality.md rule: