From 10a36f77a77a2f4373f0c26fe9dc9df8aad74ffe Mon Sep 17 00:00:00 2001 From: Cyborus Date: Wed, 8 May 2024 13:38:21 -0400 Subject: [PATCH] authenticate when fetching pull request --- src/prs.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/prs.rs b/src/prs.rs index acd2591..f74b7d7 100644 --- a/src/prs.rs +++ b/src/prs.rs @@ -504,7 +504,12 @@ async fn checkout_pr( ) }); - remote.fetch(&[&format!("pull/{}/head", pr.number())], None, None)?; + auth_git2::GitAuthenticator::new().fetch( + &local_repo, + &mut remote, + &[&format!("pull/{}/head", pr.number())], + None, + )?; let reference = local_repo.find_reference("FETCH_HEAD")?.resolve()?; let commit = reference.peel_to_commit()?;