microsoft / microsoft/hve-core
feat: Require linked GitHub issue on all pull requests
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 301
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 92
Description
Issue Description
As a team member, we should have pull request to require a linked GitHub issue so that all changes are traceable to a tracked work item and nothing merges without documented intent.
Expected Behavior
Possible changes:
A GitHub Actions workflow runs on PR open and edit events. It checks whether the PR references an issue via body keywords (e.g., Closes #123, Fixes #456) or the GitHub UI sidebar link. If no issue is found, the check fails and a comment is posted on the PR explaining the requirement. The check is configured as a required status check in branch protection so the PR cannot merge until resolved.
Acceptance Criteria
[] A GitHub Actions workflow triggers on pull_request opened, edited, and reopened events
[] The workflow detects issue references via PR body keywords (Closes, Fixes, Resolves followed by #)
[] The workflow detects issues linked via the GitHub UI sidebar
[] The status check passes when at least one issue is linked
[] The status check fails when no issue is linked
[] A comment is posted on the PR explaining that a linked issue is required when the check fails
[] The check is added as a required status check in branch protection for the default branch
[] No PRs are exempt from the check
Steps to Reproduce
- Open an PR
- No issues linked and PR is approved
- PR can now be closed without any linked issues
Additional Context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the GitHub Actions workflow entry point and the pull_request opened, edited, and reopened events described in the issue. Check how PR body keywords and GitHub sidebar links are exposed, then verify the status check and failure comment behavior. Done means linked and unlinked PRs produce the expected check result, and the check is required on the default branch.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github, github-actions
- Domain
- ci-cd
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100