pr2wt : use ssh/https remote in worktree depending on base (#27800)

This commit is contained in:
Sigbjørn Skjæret
2026-08-27 16:27:17 +03:00
committed by GitHub
parent fac889fb38
commit 1a946ec745
+5 -1
View File
@@ -48,7 +48,11 @@ echo "org/repo: $org_repo"
meta=$(curl -sSLf -H "Accept: application/vnd.github+json" "https://api.github.com/repos/$org_repo/pulls/$PR")
url_remote=$(echo "$meta" | jq -r '.head.repo.clone_url')
if [[ $url_origin =~ ^git@ ]]; then
url_remote=$(echo "$meta" | jq -r '.head.repo.ssh_url')
else
url_remote=$(echo "$meta" | jq -r '.head.repo.clone_url')
fi
head_ref=$(echo "$meta" | jq -r '.head.ref')
echo "url: $url_remote"