From 587f0372eee8db695f42ea2ad664ccb0c360ba49 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 6 Mar 2026 23:58:09 +0000 Subject: [PATCH 1/2] feat(gh): add early exit if gh default repo is not set Added a check to `executable_gh-release.sh` and `executable_gh-pr.sh` using `gh repo set-default --view` to ensure a default remote repository is configured before performing any git operations like creating tags or branches. This prevents scripts from failing midway when `gh` commands require a default repository context. --- dot_local/bin/executable_gh-pr.sh | 6 ++++++ dot_local/bin/executable_gh-release.sh | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/dot_local/bin/executable_gh-pr.sh b/dot_local/bin/executable_gh-pr.sh index e3c92be..309bb84 100644 --- a/dot_local/bin/executable_gh-pr.sh +++ b/dot_local/bin/executable_gh-pr.sh @@ -17,6 +17,12 @@ if ! command_exists git; then exit 1 fi +if ! gh repo set-default --view > /dev/null 2>&1; then + echo "X No default remote repository has been set." >&2 + echo "please run \`gh repo set-default\` to select a default remote repository." >&2 + exit 1 +fi + # Store original branch original_branch=$(git branch --show-current) diff --git a/dot_local/bin/executable_gh-release.sh b/dot_local/bin/executable_gh-release.sh index 581a67b..cdc060c 100755 --- a/dot_local/bin/executable_gh-release.sh +++ b/dot_local/bin/executable_gh-release.sh @@ -1,6 +1,12 @@ #!/bin/sh set -eux +if ! gh repo set-default --view > /dev/null 2>&1; then + echo "X No default remote repository has been set." >&2 + echo "please run \`gh repo set-default\` to select a default remote repository." >&2 + exit 1 +fi + prerelease_flag="" git_tag_inc_args="" From bba3f04fe25a400fd606f9b1e0f9b8a6f0352093 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 7 Mar 2026 00:14:14 +0000 Subject: [PATCH 2/2] feat(gh): add early exit if gh default repo is not set Added a check to `executable_gh-release.sh` and `executable_gh-pr.sh` using `gh repo set-default --view` to ensure a default remote repository is configured before performing any git operations like creating tags or branches. This prevents scripts from failing midway when `gh` commands require a default repository context.