Skip to content

feat(github-cli): add github-cli auth-on-setup option - #1606

Open
Emilien Escalle (neilime) wants to merge 8 commits into
devcontainers:mainfrom
neilime:feat/add-auto-auth-option
Open

feat(github-cli): add github-cli auth-on-setup option#1606
Emilien Escalle (neilime) wants to merge 8 commits into
devcontainers:mainfrom
neilime:feat/add-auto-auth-option

Conversation

@neilime

@neilime Emilien Escalle (neilime) commented Mar 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Add an optional authOnSetup flow to authenticate gh after container startup, and make GitHub CLI extension installation work correctly with runtime auth or a git-based fallback.

no breaking changes: the original behavior is the default one.

Changes

  • add authOnSetup and installExtensionsFromGit feature options
  • defer extension installation until post-start auth when needed
  • support token-based login via GH_TOKEN or GITHUB_TOKEN
  • fail fast for unsupported extension configurations
  • refactor the feature install flow into smaller auth and extension scripts

Battle tested with automated tests and in real-world devcontainer

@neilime
Emilien Escalle (neilime) force-pushed the feat/add-auto-auth-option branch 3 times, most recently from c219e7c to 2d610ba Compare March 19, 2026 19:34
@neilime
Emilien Escalle (neilime) marked this pull request as ready for review March 19, 2026 19:34
@neilime
Emilien Escalle (neilime) requested a review from a team as a code owner March 19, 2026 19:34
@neilime Emilien Escalle (neilime) changed the title feat: add github-cli auth-on-setup option feat(github-cli): add github-cli auth-on-setup option Mar 19, 2026
@neilime

Copy link
Copy Markdown
Contributor Author

Hi Kaniska (@Kaniska244) any chance to have this PR merged? Thank you :)

@neilime

Copy link
Copy Markdown
Contributor Author

Hi Kaniska (@Kaniska244), here is a kindly reminder, hoping having this PR merged one day :)

Thanks

@abdurriq

Copy link
Copy Markdown
Contributor

Hello Emilien Escalle (@neilime), apologies this is my fault as I've been meaning to look at this but haven't had a chance. I'll try to review this within the week.

@abdurriq

Copy link
Copy Markdown
Contributor

Emilien Escalle (@neilime) Would you be able to break this PR up, as I'm struggling to review it given the size and number of files touched?

@neilime

Copy link
Copy Markdown
Contributor Author

Abdurrahmaan Iqbal (@abdurriq) done: 6 atomic commits (atomic as much as I can) with their own purpose

{
"id": "github-cli",
"version": "1.1.0",
"version": "1.3.0",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Q: Why not 1.2.0?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Solved

@abdurriq

Copy link
Copy Markdown
Contributor

I noticed some inconsistencies in double-quotes around params and the logic between src/github-cli/scripts/install-github-cli.sh and src/github-cli/install.sh in (98182e1). I wonder why it wasn't just a 1:1 copy, since we know the old version already works. Either way, the new one seems OK, so it shouldn't be too much of an issue.

@neilime

Copy link
Copy Markdown
Contributor Author

I noticed some inconsistencies in double-quotes around params and the logic between src/github-cli/scripts/install-github-cli.sh and src/github-cli/install.sh in (98182e1). I wonder why it wasn't just a 1:1 copy, since we know the old version already works. Either way, the new one seems OK, so it shouldn't be too much of an issue.

Not a strict 1:1 copy on purpose: the top-level script now only orchestrates the install/auth/extensions scopes, so the previous logic was split into dedicated scripts. Your concern about drift was valid though, and I found one real inconsistency in the installExtensionsFromGit path and fixed it. Aside from that, the remaining differences are mostly cleanup, plus one small fallback fix in the GitHub CLI installer.

@neilime

Copy link
Copy Markdown
Contributor Author

Abdurrahmaan Iqbal (@abdurriq) Hi, any news for merging this PR? Thanks

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.

3 participants