Skip to content

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

Open
neilime wants to merge 7 commits into
devcontainers:mainfrom
neilime:feat/add-auto-auth-option
Open

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

Conversation

@neilime

@neilime 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 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 neilime marked this pull request as ready for review March 19, 2026 19:34
@neilime neilime requested a review from a team as a code owner March 19, 2026 19:34
@neilime 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 neilime force-pushed the feat/add-auto-auth-option branch from 2d610ba to fb8256f Compare March 24, 2026 05:43
Kaniska244
Kaniska244 previously approved these changes Mar 31, 2026
@neilime neilime force-pushed the feat/add-auto-auth-option branch from 15585e9 to b44f825 Compare April 27, 2026 13:52
@neilime

neilime commented Apr 27, 2026

Copy link
Copy Markdown
Contributor Author

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

@neilime neilime force-pushed the feat/add-auto-auth-option branch from b44f825 to f1345db Compare May 18, 2026 16:31
@neilime neilime force-pushed the feat/add-auto-auth-option branch from f8549e5 to 4e3dffb Compare June 9, 2026 07:05
@neilime

neilime commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

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

Thanks

@abdurriq

Copy link
Copy Markdown
Contributor

Hello @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

@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 neilime force-pushed the feat/add-auto-auth-option branch from 6504080 to 9c20ae6 Compare June 22, 2026 18:30
@neilime

neilime commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

@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.

abdurriq
abdurriq previously approved these changes Jun 23, 2026
@neilime

neilime commented Jun 23, 2026

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.

…ization

Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
@neilime neilime force-pushed the feat/add-auto-auth-option branch from 1ac67b7 to b909ce6 Compare June 23, 2026 14:37
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