authenticate when fetching pull request

This commit is contained in:
Cyborus 2024-05-08 13:38:21 -04:00
parent b42a3c27b9
commit 10a36f77a7
No known key found for this signature in database

View file

@ -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()?;