Skip to content

feat: add import-gh-token command for SSO-enabled organizations#24

Merged
steipete merged 1 commit intosteipete:mainfrom
bahag-chaurasiak:feature/import-gh-token
Jan 21, 2026
Merged

feat: add import-gh-token command for SSO-enabled organizations#24
steipete merged 1 commit intosteipete:mainfrom
bahag-chaurasiak:feature/import-gh-token

Conversation

@bahag-chaurasiak
Copy link
Copy Markdown
Contributor

Summary

Adds a new CLI command repobar import-gh-token that imports the authentication token from GitHub CLI (gh) into RepoBar's keychain.

This is useful for users in SSO-enabled organizations where:

  • The gh CLI is already authorized for their org via SAML SSO
  • RepoBar's built-in OAuth flow can't get org access (requires org admin approval for third-party OAuth apps)

Usage

repobar import-gh-token

How it works

  1. Reads the token from gh auth token
  2. Stores it in RepoBar's keychain with a 1-year expiry
  3. Works with both the CLI and the menu bar app (shared keychain)

Prerequisites

  • GitHub CLI must be installed (brew install gh)
  • User must be logged in via gh (gh auth login)
  • The gh token should have SSO authorization for the target org

Test plan

  • Build and run repobar import-gh-token
  • Verify token is imported successfully
  • Verify repobar list shows organization repos
  • Verify menu bar app shows organization repos
  • Verify repobar import-gh-token --help shows usage info

Fixes #2

Adds a new CLI command `repobar import-gh-token` that imports the
authentication token from GitHub CLI (gh) into RepoBar's keychain.

This is useful for users in SSO-enabled organizations where:
- The gh CLI is already authorized for their org via SAML SSO
- RepoBar's built-in OAuth flow can't get org access (requires admin approval)

Usage:
  repobar import-gh-token

The command:
- Reads the token from `gh auth token`
- Stores it in RepoBar's keychain with a 1-year expiry
- Works with both the CLI and the menu bar app

Fixes steipete#2
@steipete steipete merged commit 226046c into steipete:main Jan 21, 2026
1 check passed
@steipete
Copy link
Copy Markdown
Owner

Landed via temp rebase onto main.\n\n- Gate: pnpm lint && pnpm build && pnpm test\n- Land commit: bcc272096b5ab86f44d9a2aa0f8157d968e48c0f\n- Merge commit: 226046c\n\nThanks @bahag-chaurasiak!

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.

Cannot see organization repositories after install & authentication

2 participants