Skip to main content

github_repo_push_check

Function github_repo_push_check 

Source
pub fn github_repo_push_check(
    url: &str,
    probe: &GithubRepoProbe<'_>,
    outcomes: RepoAccessOutcomes,
    log: &StageLogger,
) -> PreflightCheck
Expand description

Probe GET {url} and map the outcome onto a PreflightCheck.

Builds the probe client, runs github_repo_probe, and classifies:

  • 200 + permissions.push == truePass
  • 200 + permissions.push == falseoutcomes.push_denied
  • 200 + permissions absent / unparsable body ⇒ indeterminate — Warning, or Blocker when probe.strict
  • 404, or 401 / 403 without a rate-limit signal ⇒ outcomes.missing_or_denied
  • 429, or 401 / 403 carrying a rate-limit header ⇒ indeterminate (a transient GitHub rate limit must not abort a release that would otherwise succeed) — Warning, or Blocker when probe.strict
  • 5xx / transport failure / unexpected status ⇒ indeterminate — Warning, or Blocker when probe.strict

url stays a separate argument from probe: it is the one input that differs between a caller’s base-resolving layer and its url-taking layer, which a unit test points at a local responder.