Files
multica/server/migrations/127_issue_pull_request_reference_only.up.sql
Lambda 5e9b76e683 fix(github): hide reference-only PR links from the issue PR list
A PR that merely mentions an issue key in passing in its description
(e.g. "Related to MUL-3739") was auto-linked and shown in that issue's
right-side PR list as if it were a working PR for the issue.

Add a reference_only flag to issue_pull_request. The webhook keeps
linking generously (so close_intent stays trackable across edits) but
flags a link as reference_only unless the key is a genuine target: a
title prefix, a branch reference, or a body closing keyword
(Closes/Fixes/Resolves). ListPullRequestsByIssue filters
reference_only rows, so passing body mentions are hidden from the CLI
and the UI PR list while real targets remain. reference_only follows
the same terminal preserve gate as close_intent; the auto-advance gate
is unchanged.

Closes MUL-3739

Co-authored-by: multica-agent <github@multica.ai>
2026-06-26 16:22:57 +08:00

13 lines
749 B
SQL

-- Persist whether a PR ↔ issue link is justified ONLY by a bare mention of the
-- issue identifier in the PR description (body), with no closing keyword and no
-- reference in the PR title or branch name. The auto-link layer stays generous
-- and still records the link row (so close_intent can be tracked and downgraded
-- across edits), but a reference-only link is hidden from the issue's PR list:
-- a passing "Related MUL-1" / "Follow up in MUL-1" mention should not surface
-- the PR as if it were a working PR for that issue.
--
-- Defaults to FALSE so pre-existing links keep showing until their PR's next
-- webhook re-evaluates the reference.
ALTER TABLE issue_pull_request
ADD COLUMN reference_only BOOLEAN NOT NULL DEFAULT FALSE;