get_root_commit

Function get_root_commit 

Source
pub async fn get_root_commit(
    client: &Octocrab,
    owner: &str,
    repo: &str,
) -> Result<String>
Expand description

Get the root (oldest) commit in a repository.

Uses the GitHub API compare endpoint with the empty tree SHA to fetch all commits in reverse chronological order, then returns the oldest (last) commit.

§Arguments

  • client - Octocrab GitHub client
  • owner - Repository owner
  • repo - Repository name

§Returns

The SHA of the root commit.