@oss-autopilot/core - v3.42.2
    Preparing search index...

    Function selectClosedPRStatusCandidates

    • 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.

      Parameters

      • recentlyClosedPRs: readonly {
            closedAt: string;
            closedBy?: string;
            issueUrl?: string;
            number: number;
            openedAt?: string;
            repo: string;
            title: string;
            url: string;
        }[]
      • otherPRs: readonly IssueLinkedPR[]
      • now: Date = ...

      Returns ClosedPRStatusCandidate[]