mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-08-29 10:09:43 +02:00
fix(ci): correct issue triage labels and repro detection (#49999)
## Summary of the Pull Request Fixes two automated issue-triage regressions exposed by #49989: - Stops `.github/workflows/issue-triage.md` from adding, removing, or replacing version labels. Reported versions remain available for the triage summary and update guidance only. - Expands `.github/scripts/issue-triage/issue-context.py` action detection so concise natural-language reproduction steps using verbs such as `make`, `hold`, and `use` are treated as actionable. - Adds regression coverage for #49989 and a workflow contract test that prohibits version-label management. ## PR Checklist - [x] **Communication:** Discussed with a core contributor based on the automation behavior observed in #49989 - [x] **Tests:** Added/updated and all pass - [x] **Dev docs:** Updated `.github/scripts/issue-triage/README.md` ## Detailed Description of the Pull Request / Additional comments The issue body in #49989 was not edited after creation. The workflow received the original reproduction steps, but deterministic preprocessing recognized only one action verb (`press`) and classified the steps as insufficient because two action markers were required. The publisher then added `Needs-Author-Feedback` from that result. Independently, the publisher explicitly matched the reported PowerToys version against repository labels and added `0.100.2`. That version-label mutation has been removed from both the source workflow and generated lockfile, with a static contract test to prevent it from returning. This PR does not close #49989 because that issue tracks the underlying Keyboard Manager behavior, not the triage automation regression. ## Validation Steps Performed - `python -m unittest discover .github\scripts\issue-triage\tests` — all 50 tests passed. - Evaluated the exact #49989 issue body through `reproduction_quality`; it now returns `SUFFICIENT`. - Regenerated `.github/workflows/issue-triage.lock.yml` with `gh aw compile issue-triage --no-check-update` using gh-aw v0.86.2. Copilot-Session: 498721d4-1098-4298-ac8a-147066fbfea3
This commit is contained in:
@@ -43,6 +43,15 @@ class WorkflowContractTests(unittest.TestCase):
|
||||
):
|
||||
self.assertIn(f"--deny-tool '\\''shell({command})'\\''", generated)
|
||||
|
||||
def test_workflow_never_manages_version_labels(self):
|
||||
source = WORKFLOW_SOURCE.read_text(encoding="utf-8")
|
||||
generated = WORKFLOW_LOCK.read_text(encoding="utf-8")
|
||||
|
||||
for workflow in (source, generated):
|
||||
self.assertNotIn("versionLabels", workflow)
|
||||
self.assertNotIn("desiredVersionLabel", workflow)
|
||||
self.assertRegex(source, r"never adds or removes\s+version labels")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user