Conversation
…nt closer (#169) Issues closed manually (or with a Closes #N keyword added after the PR merged) carry no ClosedEvent.closer, so solved_by_pr stayed null even when a merged same-repo PR plainly fixed them — surfacing as '—' linked PR in the UI and zero issue-discovery credit. selectClosingPr now prefers the authoritative closer, then falls back to the issue's closedByPullRequestsReferences, gated to a COMPLETED closure and a merged same-repo PR that merged at or before the close. The webhook closure path and the backfill share the selector, so a normal repo backfill re-resolves existing rows. Co-authored-by: anderdc <me@alexanderdc.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Promotes
test→main. One commit:fix(mirror): fall back to closing-PR refs when issue has no ClosedEvent closerWhat it does
When an issue is closed without GitHub recording a PR closer (manual close, or
Closes #Nadded after the fixing PR merged),solved_by_prpreviously stayed null even though a merged same-repo PR fixed it — surfacing as—linked PR and zero issue-discovery credit.selectClosingPrnow prefers the authoritativeClosedEvent.closer, then falls back toclosedByPullRequestsReferences, gated to COMPLETED + merged + same-repo +mergedAt ≤ closedAt. Shared by both the webhook closure path and the backfill.Schema / migrations
None — code-only change to
github-fetcher.service.ts(GraphQL query + attribution logic). No runbook SQL required.Post-deploy step
Trigger a backfill to repair existing rows:
Verify via
GET /api/v1/dashboard/issues?since=2026-05-20T00:00:00Z: ragflow #15115/#15117/#15367/#15369 should gain a non-nullsolving_pr; #15119 (unmerged ref) and #15365 (open ref) correctly stay null.