mirror of
https://codeberg.org/Cyborus/forgejo-cli.git
synced 2024-11-14 05:59:27 +01:00
authenticate when fetching pull request
This commit is contained in:
parent
b42a3c27b9
commit
10a36f77a7
1 changed files with 6 additions and 1 deletions
|
@ -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 reference = local_repo.find_reference("FETCH_HEAD")?.resolve()?;
|
||||||
let commit = reference.peel_to_commit()?;
|
let commit = reference.peel_to_commit()?;
|
||||||
|
|
Loading…
Reference in a new issue