Skip to main content

parse_check_verdict

Function parse_check_verdict 

Source
pub fn parse_check_verdict(body: &str) -> Verdict
Expand description

Parses the response body of GET /commits/{sha}/check-runs into a Verdict. Neutral and skipped conclusions count as success; anything else non-success (failure, cancelled, timed out) fails the train.

Reads only status and conclusion, each compared against a fixed set of literals. Check-run names, titles, summaries and output text are attacker-influenceable — a workflow is defined in the repository, so a pull request can propose one — and none of them reach this decision. See Pr for why that matters.