mirror of
https://github.com/multica-ai/multica.git
synced 2026-08-03 19:20:07 +02:00
This reverts commit 139cc89200.
Co-authored-by: Bohan-J <bohan@devv.ai>
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
@@ -496,7 +496,6 @@ per_app_latest AS (
|
||||
FROM github_pull_request_check_suite cs
|
||||
JOIN issue_prs ip ON ip.id = cs.pr_id
|
||||
WHERE cs.head_sha = ip.head_sha AND ip.head_sha <> ''
|
||||
AND cs.status = 'completed'
|
||||
ORDER BY cs.pr_id, cs.app_id, cs.updated_at DESC
|
||||
),
|
||||
checks AS (
|
||||
@@ -573,19 +572,6 @@ type ListPullRequestsByIssueRow struct {
|
||||
// pending view. reference_only links (a PR that merely mentions the issue
|
||||
// identifier in its body, with no closing keyword and no title/branch
|
||||
// reference) are filtered out — they are not working PRs for this issue.
|
||||
// Only `completed` suites are eligible. The webhook handler already refuses
|
||||
// to record anything else (MUL-5180), but this filter is what makes the card
|
||||
// correct for rows that predate that gate: an installation holding Checks
|
||||
// write accumulated `queued` suites GitHub had opened for Multica itself,
|
||||
// and nothing will ever move them to `completed`. Counting them keeps the PR
|
||||
// pinned to "checks running" — `checks_pending` outranks `checks_passed` in
|
||||
// derivePullRequestStatusKind — for as long as the head SHA stands.
|
||||
//
|
||||
// Filtering here rather than deleting the rows makes the recovery automatic
|
||||
// and source-agnostic: it holds for legacy rows, for stash rows replayed by
|
||||
// replayPendingCheckSuitesForPR, and for any future writer that forgets the
|
||||
// gate. The DISTINCT ON runs after the filter, so an app whose newest suite
|
||||
// is a stuck `queued` still reports its most recent completed verdict.
|
||||
func (q *Queries) ListPullRequestsByIssue(ctx context.Context, issueID pgtype.UUID) ([]ListPullRequestsByIssueRow, error) {
|
||||
rows, err := q.db.Query(ctx, listPullRequestsByIssue, issueID)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user