From 9e2cbf9a30880ce10baf1f5b37ae419607a4f573 Mon Sep 17 00:00:00 2001 From: Gustavo Madeira Santana Date: Thu, 2 Apr 2026 19:53:20 -0400 Subject: [PATCH] chore: tighten pr push script --- scripts/pr-lib/push.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/pr-lib/push.sh b/scripts/pr-lib/push.sh index ca5bae22ed0..34075207a76 100644 --- a/scripts/pr-lib/push.sh +++ b/scripts/pr-lib/push.sh @@ -3,7 +3,7 @@ resolve_head_push_url() { source .local/pr-meta.env if [ -n "${PR_HEAD_OWNER:-}" ] && [ -n "${PR_HEAD_REPO_NAME:-}" ]; then - printf 'git@github.com:%s/%s.git\n' "$PR_HEAD_OWNER" "$PR_HEAD_REPO_NAME" + printf 'https://github.com/%s/%s.git\n' "$PR_HEAD_OWNER" "$PR_HEAD_REPO_NAME" return 0 fi @@ -188,13 +188,13 @@ resolve_prhead_remote_sha() { local current_push_url current_push_url=$(git remote get-url prhead 2>/dev/null || true) if [ -n "$https_url" ] && [ "$https_url" != "$current_push_url" ]; then - echo "SSH remote failed; falling back to HTTPS..." + echo "SSH remote failed; falling back to HTTPS..." >&2 git remote set-url prhead "$https_url" git remote set-url --push prhead "$https_url" remote_sha=$(git ls-remote prhead "refs/heads/$pr_head" 2>/dev/null | awk '{print $1}' || true) fi if [ -z "$remote_sha" ]; then - echo "Remote branch refs/heads/$pr_head not found on prhead" + echo "Remote branch refs/heads/$pr_head not found on prhead" >&2 exit 1 fi fi