fix(robomp): route issues.reopened to admission-gated re-triage

The finalized-issue boilerplate promises "reopen and I'll triage again from
scratch," but github_events.route() dropped issues.reopened to the ignored
skip branch (only opened/closed handled), while pull_request.reopened was
already routed. A user following the instruction got silence.

Route issues.reopened like issues.opened (submitter-attributable triage_issue,
same per-user rate budget) and dispatch it in queue._dispatch(). triage_issue
now tears down a stale finalized workspace (merged/closed/abandoned) before
re-provisioning, mirroring the maintainer directive-reopen teardown so the
re-triage branches afresh from default instead of a merged/deleted branch.

Fixes #5891
This commit is contained in:
roboomp
2026-07-23 19:18:48 +00:00
parent c64e7146e0
commit 3967ad0d5d
5 changed files with 103 additions and 4 deletions
+21
View File
@@ -53,6 +53,27 @@ def test_route_issue_opened_queues_triage() -> None:
assert decision.issue_key == "octo/widget#4"
def test_route_issue_reopened_queues_triage() -> None:
# `finalized_issue_comment.md` promises re-triage on reopen; the router must
# queue it as a submitter-attributable triage (not drop it to the skip branch).
decision = route(
"issues",
{
"action": "reopened",
"issue": {"number": 4, "user": {"login": "alice"}, "author_association": "CONTRIBUTOR"},
"repository": {"full_name": "octo/widget"},
},
allowlist=ALLOWLIST,
bot_login=BOT,
)
assert decision.should_queue
assert decision.task == "triage_issue"
assert decision.issue_key == "octo/widget#4"
assert decision.reason == "issues.reopened"
assert decision.submitter == "alice"
assert decision.association == "CONTRIBUTOR"
def test_route_skips_disallowed_repo() -> None:
decision = route(
"issues",