Skip to content

Add Copilot-Instructions label policy rule - #304

Merged
Demitrius Nelon (denelon) merged 3 commits into
microsoft:mainfrom
denelon:add-copilot-instructions-label
Aug 6, 2026
Merged

Add Copilot-Instructions label policy rule#304
Demitrius Nelon (denelon) merged 3 commits into
microsoft:mainfrom
denelon:add-copilot-instructions-label

Conversation

@denelon

@denelon Demitrius Nelon (denelon) commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

📖 Description

Adds a policy-bot rule to automatically apply a Copilot-Instructions label to pull requests that modify .github/copilot-instructions.md or any .github/instructions/*.instructions.md file, so reviewers get extra visibility when Copilot's guidance changes.

The rule triggers on PR Opened and Synchronize, matches files via regex, and is guarded with a
ot: hasLabel check so it won't re-fire once the label is already applied.

Created with GitHub Copilot's assistance.

🔗 References

Closes #303

🔍 Validation

  • Validated the YAML with PowerShell's powershell-yaml module (ConvertFrom-Yaml).
  • Cross-checked all conditions/actions against the documented GitOps.PullRequestIssueManagement policy schema.
  • Confirmed no unrelated rules (e.g. the existing Needs-CLA first-time-contributor rule) were disturbed by this change.

✅ Checklist

📋 Issue Type

  • Bug fix
  • Feature
  • Task
Microsoft Reviewers: Open in CodeFlow

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@microsoft-github-policy-service microsoft-github-policy-service Bot added Project-File Needs-Attention This work item needs to be reviewed by a member of the core team labels Aug 6, 2026
@denelon
Demitrius Nelon (denelon) marked this pull request as ready for review August 6, 2026 21:00
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@microsoft-github-policy-service microsoft-github-policy-service Bot removed the Needs-Attention This work item needs to be reviewed by a member of the core team label Aug 6, 2026
@denelon
Demitrius Nelon (denelon) merged commit 258d8f6 into microsoft:main Aug 6, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Copilot-Instructions label policy rule for PR visibility

2 participants