Skip to main content

pr_for_head_within

Function pr_for_head_within 

Source
async fn pr_for_head_within<S: BuildHasher>(
    cwd: &Path,
    env: &HashMap<String, String, S>,
    branch: &str,
    pushed_sha: Option<&str>,
    prev: Option<&GitDiffSnapshot>,
    pr_refresh: PrRefresh,
    budget: Duration,
) -> (Option<GitPrInfo>, Vec<GitIssueRef>, Option<SystemTime>)
Expand description

Resolve PR info for the branch from prev’s cache when fresh, else query fresh by the pushed sha. Stamps pr_fetched_at on the returned attempt time so failed / empty lookups rate-limit too. A Failed lookup keeps prev’s PR when branch and sha still match - a gh blip must not flash the row off.

The gh children it spawns are bounded by budget; see scan_within for why a test spells its own.