Skip to content

Fix policy bot bugs and expand label coverage#6202

Merged
denelon merged 1 commit into
microsoft:masterfrom
denelon:denelon/policy-bot-improvements
May 4, 2026
Merged

Fix policy bot bugs and expand label coverage#6202
denelon merged 1 commit into
microsoft:masterfrom
denelon:denelon/policy-bot-improvements

Conversation

@denelon

@denelon denelon commented May 3, 2026

Copy link
Copy Markdown
Collaborator

📖 Description

Modernizes policy bot regex handling by switching to inline flags, fixes triageLabels so auto-applied labels do not clear triage too early, removes unused automergeTriggers, restores Needs-Author-Feedback coverage, and cleans up related stale-flow behavior.

Created with GitHub Copilot assistance.

🔗 References

Resolves #6208

🔍 Validation

  • Reviewed all policy file changes.

✅ Checklist

📋 Issue Type

  • Bug fix
  • Feature
  • Task

Comment thread .github/policies/labelManagement.triageLabels.yml Outdated
Comment thread .github/policies/moderatorTriggers.yml Outdated
Comment thread .github/policies/labelManagement.triageLabels.yml Outdated
Comment thread .github/policies/moderatorTriggers.yml Outdated

@Trenly Trenly left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As long as you're touching files, I'd recommend removing the automergeTriggers.yml and the associated label since it's not used at all

- Convert regex patterns to (?in) inline flags with label-matching casing
- Add Needs-Author-Feedback back to triageLabels (safe for issues)
- Remove unused automergeTriggers.yml policy
- Fix Needs-Triage removal to exclude auto-applied labels
- Fix stale issue flow and issueUpdated handlers

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@denelon denelon force-pushed the denelon/policy-bot-improvements branch from 3825078 to 96890da Compare May 4, 2026 01:33
@denelon denelon marked this pull request as ready for review May 4, 2026 02:33
@denelon denelon requested a review from a team as a code owner May 4, 2026 02:33

@Trenly Trenly left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to have a Moderation.md similar to what we have over at microsoft/winget-pkgs indicating all the labels that can be applied with comment triggers.

🤖 can party on that in a separate PR perhaps, after this merges?

@denelon denelon merged commit a57ae89 into microsoft:master May 4, 2026
6 checks passed
@Trenly Trenly mentioned this pull request May 28, 2026
8 tasks
denelon pushed a commit that referenced this pull request May 28, 2026
## 📖 Description
<!-- Describe what this PR changes, why, and any limitations. -->
Although these three labels get applied when the issue is opened, it is
technically a separate event that happens *after* the the issue is
opened. This means that the policy service is catching this event and
removing issues from triage before they are actually triaged. This is a
faulty implementation from #6202

## 🔗 References
<!-- Link related issues, PRs, or docs. Use "Resolves #1234" to
auto-close. -->
See recently opened issue
#6245

## 🔍 Validation
None
<!-- How did you test? List manual steps or note automated test
coverage. -->

## ✅ Checklist
<!-- Place an "x" between the brackets to check an item. e.g: [x] -->

- [x] Signed the [Contributor License
Agreement](https://cla.opensource.microsoft.com)
- [ ] Linked to an issue
- [ ] Updated [Release Notes](../doc/ReleaseNotes.md) (if applicable)
- [ ] Updated documentation (if applicable)
- [ ] Updated [Copilot instructions](.github/copilot-instructions.md)
(if build, architecture, or conventions changed)

## 📋 Issue Type
<!-- Select the type that best describes this PR -->
- [x] Bug fix
- [ ] Feature
- [ ] Task

###### Microsoft Reviewers: [Open in
CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/microsoft/winget-cli/pull/6254)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve policy bot rules: regex modernization, label coverage, and cleanup

3 participants