-
Notifications
You must be signed in to change notification settings - Fork 1
Add GitHub CLI and replace SSH auth with gh auth #124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideIntroduces GitHub CLI as a project dependency and updates the devcontainer to use gh-based authentication and configuration, while refreshing tooling configuration (ty, extensions) and fixing minor config issues. Sequence diagram for GitHub operations using gh instead of SSH in devcontainersequenceDiagram
actor Dev as Developer
participant VS as VSCode
participant DC as Devcontainer
participant GH as gh_CLI
participant GI as GitHub
Dev->>VS: Open project in container
VS->>DC: Start devcontainer build
DC->>DC: Create /home/vscode/.ssh
DC->>DC: Create /home/vscode/.config/gh
VS->>DC: Mount host ~/.config/gh to /home/vscode/.config/gh
Dev->>GH: Run gh auth status
GH->>DC: Read /home/vscode/.config/gh
GH->>GI: Verify authentication
GI-->>GH: Auth status response
GH-->>Dev: Show authenticated user
Dev->>GH: Run gh repo clone or gh pr commands
GH->>GI: Perform GitHub API and git operations
GI-->>GH: Operation result
GH-->>Dev: Show success/failure
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey - I've found 1 issue, and left some high level feedback:
- In the Dockerfile, consider setting restrictive permissions on
/home/vscode/.config/gh(similar to the.sshdirectory) to avoid leaving GitHub auth configuration with default/overly-permissive permissions. - The
ghdependency inpyproject.tomlis pinned only with a lower bound (>=2.63.0) while other tooling dependencies have both lower and upper bounds; consider adding an upper bound for consistency and to avoid unexpected breakage from future major/minor releases.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In the Dockerfile, consider setting restrictive permissions on `/home/vscode/.config/gh` (similar to the `.ssh` directory) to avoid leaving GitHub auth configuration with default/overly-permissive permissions.
- The `gh` dependency in `pyproject.toml` is pinned only with a lower bound (`>=2.63.0`) while other tooling dependencies have both lower and upper bounds; consider adding an upper bound for consistency and to avoid unexpected breakage from future major/minor releases.
## Individual Comments
### Comment 1
<location> `pyproject.toml:23` </location>
<code_context>
python = ">=3.10"
shellcheck = ">=0.10.0,<0.11"
devpod = ">=0.8.0,<0.9"
+gh = ">=2.63.0"
[tool.pixi.feature.py310.dependencies]
</code_context>
<issue_to_address>
**suggestion:** Consider adding an upper bound to the gh version for better reproducibility.
With only a lower bound, a future `gh` release could introduce breaking changes into the dev environment without any updates here. To keep dev containers reproducible and isolated from unexpected upstream changes, consider adding an upper bound (e.g. `<3.0` or another range you’ve verified).
```suggestion
gh = ">=2.63.0,<3.0"
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| python = ">=3.10" | ||
| shellcheck = ">=0.10.0,<0.11" | ||
| devpod = ">=0.8.0,<0.9" | ||
| gh = ">=2.63.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Consider adding an upper bound to the gh version for better reproducibility.
With only a lower bound, a future gh release could introduce breaking changes into the dev environment without any updates here. To keep dev containers reproducible and isolated from unexpected upstream changes, consider adding an upper bound (e.g. <3.0 or another range you’ve verified).
| gh = ">=2.63.0" | |
| gh = ">=2.63.0,<3.0" |
Summary
gh) to project dependencies for GitHub operationsTest plan
ghCLI is available and authenticated in the containerghinstead of SSH🤖 Generated with Claude Code
Summary by Sourcery
Add GitHub CLI support to the devcontainer and project tooling while aligning configs and lockfiles with the new workflow.
New Features:
Bug Fixes:
Enhancements: