Persist GitHub CLI account selection#31
Merged
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds the ability to pin GH_TOKEN injection to a specific GitHub CLI (gh) account by introducing --gh-user/--gh-host, persisting the selected account metadata in .devbox/state.json, surfacing it in devbox status, and documenting the selection precedence.
Changes:
- Add
--gh-user/--gh-hostparsing forupandrebuild, and persist the chosen{ host, user }asgithubAuthin workspace state. - Thread the persisted
githubAuthpreference through host environment resolution sogh auth tokencan target a specific account. - Extend status output, tests, and README docs to include/describe
githubAuth.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/status.test.ts | Updates status expectations to include githubAuth. |
| tests/runtime.test.ts | Adds unit tests for buildGhCliTokenArgs. |
| tests/core.test.ts | Adds coverage for arg parsing validation and persisted githubAuth loading. |
| tests/arise.test.ts | Updates workspace state fixtures to include githubAuth. |
| src/status.ts | Adds githubAuth to DevboxStatus and returns it from state. |
| src/runtime.ts | Adds GithubAuthPreference plumbing + buildGhCliTokenArgs for targeted gh auth token. |
| src/core.ts | Extends workspace state schema/migration to include githubAuth; adds CLI flag parsing. |
| src/cli.ts | Resolves githubAuth preference from flags/env/state and persists it after up/rebuild. |
| README.md | Documents flags, precedence, and status payload example including githubAuth. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PabloZaiden
enabled auto-merge (squash)
June 30, 2026 14:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Validation