microsoft / microsoft/hve-core

feat: Require linked GitHub issue on all pull requests

Open
#1,306 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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
  1. Open an PR
  2. No issues linked and PR is approved
  3. PR can now be closed without any linked issues
Additional Context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.