Skip to main content

fetch_repo_tree

Function fetch_repo_tree 

Source
pub async fn fetch_repo_tree(
    client: &Octocrab,
    owner: &str,
    repo: &str,
    language: &str,
    keywords: &[String],
) -> Result<Vec<String>>
Expand description

Fetches the repository file tree from GitHub.

Attempts to fetch from the default branch (main, then master). Returns filtered list of source file paths based on repository language and optional keywords.

§Arguments

  • client - Authenticated Octocrab client
  • owner - Repository owner
  • repo - Repository name
  • language - Repository primary language for filtering
  • keywords - Optional keywords extracted from issue title for relevance matching

§Errors

Returns an error if the API request fails (but not if tree is unavailable).