fix: Improve Docker/server support and fix glab --jq compatibility#6
Merged
fix: Improve Docker/server support and fix glab --jq compatibility#6
Conversation
Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: #5
- Fix README.md manual commands to use pipe to jq instead of --jq flag (glab api does not have a built-in --jq flag in all versions) - Add note about jq being required for manual commands - Add "Authentication in Docker/Server Environments" section to README with instructions for completing OAuth via curl or SSH tunneling - Enhance CLI with helpful headless auth instructions when authentication is required in Docker/server environments - Fix src/index.js to parse JSON responses in JavaScript instead of relying on glab's --jq flag (improves compatibility with all glab versions) - Optimize getGitLabUserInfo to use a single API call instead of two Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This reverts commit 005918f.
Member
Author
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
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
This PR addresses the issues reported in #5 about glab-setup-git-identity not working properly in Docker/server environments:
jqinstead of--jqflag (glab api does not have a built-in--jqflag in all versions)screen+curl -Lto complete OAuth in Docker containers--jqflag, improving compatibility with all glab versionsChanges
README.md
glab api user | jq -r '.username'instead ofglab api user --jq '.username'jqmust be installed for manual commandsglab auth login --hostname... --git-protocol...toglab auth login(interactive mode doesn't support extra flags)src/cli.js
printHeadlessAuthInstructions()function that displays helpful instructions when authentication is neededhandleNotAuthenticated()to show these instructions before attempting authsrc/index.js
getGitLabUsername()now parses JSON response in JavaScript instead of using--jqflaggetGitLabEmail()now parses JSON response in JavaScript instead of using--jqflaggetGitLabUserInfo()optimized to make a single API call and parse both valuesTest Plan
Fixes #5
Generated with Claude Code