Skip to main content

default_branch_candidates

Function default_branch_candidates 

Source
pub fn default_branch_candidates() -> Vec<String>
Expand description

GITHUB_BASE_REF (PR base) then main / master.

GITHUB_REF_NAME is not a candidate: on push it is the branch being pushed, so origin/<that branch> would always match HEAD. A non-main default on Actions is origin/HEAD, which ensure_origin_head fetches and points at VERCTL_DEFAULT_BRANCH.