Repository navigation
feat(github-cli): add github-cli auth-on-setup option - #1606
Emilien Escalle (neilime) wants to merge 8 commits into
Conversation
c219e7c to
2d610ba
Compare
2d610ba to
fb8256f
Compare
15585e9 to
b44f825
Compare
|
Hi @Kaniska244 any chance to have this PR merged? Thank you :) |
b44f825 to
f1345db
Compare
f8549e5 to
4e3dffb
Compare
|
Hi @Kaniska244, here is a kindly reminder, hoping having this PR merged one day :) Thanks |
|
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. |
|
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? |
6504080 to
9c20ae6
Compare
9c20ae6 to
ad1b835
Compare
|
Abdurrahmaan Iqbal (@abdurriq) done: 6 atomic commits (atomic as much as I can) with their own purpose |
|
I noticed some inconsistencies in double-quotes around params and the logic between |
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. |
1ac67b7 to
b909ce6
Compare
b909ce6 to
cdec3c5
Compare
|
Abdurrahmaan Iqbal (@abdurriq) Hi, any news for merging this PR? Thanks |
d3ccc36 to
f2edbb4
Compare
|
Hi Abdurrahmaan Iqbal (@abdurriq) this is a kindly reminder for my PR :) |
|
Emilien Escalle (@neilime) Apologies, this totally slipped my mind. I'll try to prioritise this and review it by mid-next week. |
|
Copilot resolve the merge conflicts in this pull request |
Abdurrahmaan Iqbal (@abdurriq) No problem, I can rebase and fix conflict if it can help |
|
Emilien Escalle (@neilime) Yes, please. |
…ization Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
f2edbb4 to
f6c8bd6
Compare
Done. |
| exit 1 | ||
| validate_configuration() { | ||
| if has_unsupported_extensions_configuration; then | ||
| die "Unsupported extensions configuration. When 'extensions' is set, enable 'authOnSetup' to install after authentication or set 'installExtensionsFromGit' to true to clone extensions during feature setup." |
There was a problem hiding this comment.
With both new options defaulting to false, validate_configuration now exits before installing gh, so anyone pinned to :1 of this feature using the existing {"extensions": "..."} configuration, including the README example, will have their config broken. Could the default keep the previous attempt-gh-then-clone behavior when neither option is set?
| } | ||
|
|
||
| main() { | ||
| if is_auth_setup_complete || ! is_gh_available; then |
There was a problem hiding this comment.
This early exit also skips deferred extension installation, not just auth, so a marker left in a persistent home causes extensions added on a rebuild to be ignored. Could the hook process pending extensions.env before honouring the marker, or tie the marker to the current extension config?
Restore default extension installation with a Git fallback, reject clones without runnable entry points, and rerun deferred installs when their configuration changes. Add regression coverage and regenerate feature documentation. Validated with five container tests, focused regression tests, ShellCheck, and metadata validation. Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
Summary
Add an optional
authOnSetupflow to authenticateghafter 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
authOnSetupandinstallExtensionsFromGitfeature optionsGH_TOKENorGITHUB_TOKENBattle tested with automated tests and in real-world devcontainer