Skip to main content

persist_detected_pr

Function persist_detected_pr 

Source
pub fn persist_detected_pr(
    repo: &Repository,
    branch: &str,
    number: u64,
) -> Result<()>
Expand description

Persist an auto-detected PR number to its own branch-config key (gwm-pr-detected, issue #283), distinct from the explicit gwm-pr. This lets the no-fetch table read path surface the detected PR on every row without a per-row gh shell-out, while keeping the detected/explicit distinction the pane badge needs. An explicit gwm link --pr still wins in read_link. Re-detection overwrites the stored value and clears a cached title only when the detected number actually changed.