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
+5 -2
View File
@@ -300,10 +300,13 @@ def route(
if not isinstance(number, int):
return RouteDecision("skip", None, repo, None, "issue missing number")
key = issue_key(repo, number)
if action == "opened":
if action in ("opened", "reopened"):
# A reopen is submitter-attributable exactly like an open, and
# `finalized_issue_comment.md` promises re-triage on reopen, so it
# re-triages from scratch and spends the same per-user rate budget.
login, assoc = _submitter_info(issue)
return RouteDecision(
"queue", "triage_issue", repo, key, "issues.opened", submitter=login, association=assoc
"queue", "triage_issue", repo, key, f"issues.{action}", submitter=login, association=assoc
)
if action == "closed":
# Cleanup is a lifecycle event, not a user submission; no rate-limit subject.