Skip to content

Commit f9a6691

Browse files
committed
fix: pass the repository to gh signoff install through GH_REPO
gh signoff install accepts only --branch; any other dashed option is an unknown-option failure. Under set -e the script stopped there, after the branch-protection PUT had landed and before the signoff ruleset existed, so a transition run would have kept main on the Actions checks alone and a --local-only run would have left it with no status requirement at all. The extension resolves the repository through gh api repos/:owner/:repo, which GH_REPO overrides. Claude-Session: https://claude.ai/code/session_0125BCU48L9AmmM1JbBKeyQe
1 parent 69b79f2 commit f9a6691

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎scripts/protect-main.sh‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ JSON
8181
if ! gh extension list 2>/dev/null | grep -q 'basecamp/gh-signoff'; then
8282
gh extension install basecamp/gh-signoff
8383
fi
84-
gh signoff install --repo "$REPO"
84+
# The extension takes no --repo (only --branch); it resolves the repository
85+
# through `gh api repos/:owner/:repo`, which GH_REPO overrides.
86+
GH_REPO="$REPO" gh signoff install
8587

8688
if [ "$MODE" = "local-only" ]; then
8789
echo "main is now protected: 1 approving CODEOWNER review + a signed-off local CI run (npm run ci -- --signoff) before merge. No Actions check is required."

0 commit comments

Comments
 (0)