pub fn apply_detected_pr(link: &mut BranchLink, detected: Option<u64>)Expand description
Stamp an auto-detected PR number onto link when no PR is already
linked. Pure helper (issue #181): the caller supplies the detection
result — typically find_pr_for_branch(slug, branch).ok().flatten() —
and this decides whether to apply it.
An explicit (or previously-detected) PR always wins: when link.pr
is already Some, this is a no-op so a gwm link --pr override is
never clobbered. The applied number is marked LinkSource::Detected.
This function only mutates the in-memory BranchLink; call
persist_detected_pr separately to write it to the git config so the
table read path (issue #283) picks it up.