Pick the recently closed PRs that should prompt a status update.
Drops, in this order:
PRs with no parsed issue link (nothing to update) or an issue URL that
does not parse.
PRs whose closedAt is unparseable or older than
CLOSED_PR_STATUS_WINDOW_DAYS relative to now. The search behind
recentlyClosedPRs is bounded on updated, so a stale close that just
got a comment can come back.
Superseded PRs: another of the user's PRs in otherPRs closes the same
issue, or mentions the issue or the closed PR anywhere in its title or
body (#N, owner/repo#N, or the URL). The issue thread then already
has a live successor and the claim stays. Superseding is the safe
direction, so any mention counts, closing keyword or not.
When several closed PRs link the same issue, only the latest close
survives so the user is asked about each issue once.
Pick the recently closed PRs that should prompt a status update.
Drops, in this order:
closedAtis unparseable or older than CLOSED_PR_STATUS_WINDOW_DAYS relative tonow. The search behindrecentlyClosedPRsis bounded onupdated, so a stale close that just got a comment can come back.otherPRscloses the same issue, or mentions the issue or the closed PR anywhere in its title or body (#N,owner/repo#N, or the URL). The issue thread then already has a live successor and the claim stays. Superseding is the safe direction, so any mention counts, closing keyword or not.When several closed PRs link the same issue, only the latest close survives so the user is asked about each issue once.