Add gh auth preflight check to authorize-partner-secret.sh#34
Conversation
Two real hiccups came up authorizing partners on staging: macOS's bash 3.2 (fixed in the parent commit) and a stale/expired gh session that only surfaced as a 401 at the very last step, after already going through the staging login flow. Check gh auth status up front instead and fail fast with the fix steps, and document checking it before starting in the README. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
e5590cc
into
fix/authorize-partner-secret-bash32
Summary
Stacked on #33 (bash 3.2 fix). Two real hiccups came up while rolling this script out:
ghsession — this only surfaced asHTTP 401: Bad credentialsat the very last step (gh secret set), after already going through the full staging login flow to get a fresh partner token.This adds a
gh auth statuspreflight check right after resolving the target repo, before the script ever prompts for the sensitive api key — so a badghsession fails fast with the fix steps instead of wasting a token/login cycle. Also documents checkinggh auth statusproactively in the README, and fixes a staleMARKET_REPOStable reference left over from #33's refactor.Test plan
gh auth status— exits immediately with thegh auth loginsteps, before any promptgh auth statusand fakesilverfin/gh— proceeds through normallyghsession🤖 Generated with Claude Code