Skip to main content

detect_base_branch

Function detect_base_branch 

Source
pub fn detect_base_branch() -> Result<String>
Expand description

Detect the default base branch for the repository (main or master).

Checks for existence of common default branch names.

§Returns

  • Ok(String) - The detected base branch name (“main” or “master”)
  • Err - If neither branch exists