Skip to content

Add gh auth preflight check to authorize-partner-secret.sh#34

Merged
michieldegezelle merged 1 commit into
fix/authorize-partner-secret-bash32from
feature/gh-auth-preflight
Jul 24, 2026
Merged

Add gh auth preflight check to authorize-partner-secret.sh#34
michieldegezelle merged 1 commit into
fix/authorize-partner-secret-bash32from
feature/gh-auth-preflight

Conversation

@michieldegezelle

Copy link
Copy Markdown
Collaborator

Summary

Stacked on #33 (bash 3.2 fix). Two real hiccups came up while rolling this script out:

This adds a gh auth status preflight check right after resolving the target repo, before the script ever prompts for the sensitive api key — so a bad gh session fails fast with the fix steps instead of wasting a token/login cycle. Also documents checking gh auth status proactively in the README, and fixes a stale MARKET_REPOS table reference left over from #33's refactor.

Test plan

  • Ran full script on bash 3.2 with a fake failing gh auth status — exits immediately with the gh auth login steps, before any prompt
  • Ran full script on bash 3.2 with a fake succeeding gh auth status and fake silverfin/gh — proceeds through normally
  • One real run against a real market repo with a real partner token, to confirm the preflight doesn't false-positive on a genuinely valid gh session

🤖 Generated with Claude Code

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>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 66be5312-0a46-41b8-a889-a23ff8aa6d53

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/gh-auth-preflight

Comment @coderabbitai help to get the list of available commands.

@michieldegezelle
michieldegezelle merged commit e5590cc into fix/authorize-partner-secret-bash32 Jul 24, 2026
1 check passed
@michieldegezelle
michieldegezelle deleted the feature/gh-auth-preflight branch July 24, 2026 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant