Skip to content

Commit

Permalink
Stop hardcoding github.com
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSandro2000 committed Aug 15, 2024
1 parent 845956d commit cfaf48a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,19 +193,20 @@ fn find_values_yaml(workspace: String, base: &str, head: &str) -> Result<Vec<Rep
Ok(changes)
}

// TODO: make member function of repo
async fn find_reviews(octocrab: &Arc<Octocrab>, repo: &mut RepoChange) -> Result<(), anyhow::Error> {
let (repo_owner, repo_name) = parse_remote(&repo.remote).context("while parsing remote")?;

let link_prefix = format!("https://github.com/{repo_owner}/{repo_name}");

let compare = octocrab
.commits(repo_owner.clone(), repo_name.clone())
.compare(&repo.base_commit, &repo.head_commit)
.send()
.await
.context(format!(
"failed to compare {link_prefix}/compare/{}...{}",
&repo.base_commit, &repo.head_commit
"failed to compare {}/compare/{}...{}",
repo.remote.trim_end_matches(".git"),
&repo.base_commit,
&repo.head_commit
))?;

for commit in &compare.commits {
Expand Down

0 comments on commit cfaf48a

Please sign in to comment.