Refactor policy bot rules into separate files#663
Open
denelon wants to merge 5 commits intomicrosoft:mainfrom
Open
Refactor policy bot rules into separate files#663denelon wants to merge 5 commits intomicrosoft:mainfrom
denelon wants to merge 5 commits intomicrosoft:mainfrom
Conversation
Trenly
reviewed
May 4, 2026
Split the monolithic resourceManagement.yml into 8 focused files matching the pattern used in winget-cli and winget-dsc: - scheduledSearch.markNoRecentActivity.yml - scheduledSearch.closeNoRecentActivity.yml - labelAdded.noRecentActivity.yml - labelManagement.issueOpened.yml - labelManagement.issueUpdated.yml - labelManagement.issueClosed.yml (new — labels were not cleaned on close) - moderatorTriggers.yml - automergeTriggers.yml Behavioral improvements: - Add Blocking-Issue and Issue-Feature exemptions to stale issue closure - Add cleanEmailReply for Pull_Request_Review_Comment payloads - Add label cleanup on issue and PR close (previously missing) - Split stale warning replies into labelAdded responder for cleaner separation - Add descriptions to all rules for maintainability All existing behavior preserved: stale timers (7+7 days), duplicate close flow, Resolution-Duplicate auto-close (1 day), Feedback Hub flow, empty body issue close, label sync, inPrLabel, automerge, and CodeFlow links. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
89f7f8f to
c75f560
Compare
Trenly
approved these changes
May 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📖 Description
Refactors the Policy Bot rules from one monolithic configuration into separate files by concern. Removes the unused
automergeTriggersrules, simplifiesissueClosed, and adds the intended(?in)regex behavior for the Duplicate handling pattern.Changed files
.github/policies/labelAdded.noRecentActivity.yml.github/policies/labelManagement.issueClosed.yml.github/policies/labelManagement.issueOpened.yml.github/policies/labelManagement.issueUpdated.yml.github/policies/moderatorTriggers.yml.github/policies/resourceManagement.yml.github/policies/scheduledSearch.closeNoRecentActivity.yml.github/policies/scheduledSearch.markNoRecentActivity.ymlCreated with GitHub Copilot assistance.
🔗 References
Resolves #666
🔍 Validation
✅ Checklist
📋 Issue Type