pub fn commit_branch(repo: &Path, run_id: &str) -> Result<Option<String>>Expand description
The branch whose head is this run’s commit, if it left one here.
The same two places diff reads from, and the same reason for checking
the head rather than trusting the name: a refused run has a branch too — it
was created before the agent started — whose head is the commit it branched
from. Building on that would silently start from somewhere else’s work.
None is a true answer: the run produced no commit, or produced it in a
different repository.