Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(cli): support opening devcontainers in vscode#17189

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
DanielleMaywood merged 9 commits intomainfromdm-open-devcontainer-cli
Apr 3, 2025

Conversation

DanielleMaywood
Copy link
Contributor

@DanielleMaywoodDanielleMaywood commentedApr 1, 2025
edited
Loading

Closes#16427

Adds the option-c,--container toopen vscode that allows opening VSCode into a running devcontainer.

Copy link
Contributor

@CopilotCopilotAI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for opening development containers in VS Code via the CLI. Key changes include:

  • Updating the CLI documentation to include a new flag (-c, --container) for specifying the container name.
  • Adding tests to cover various scenarios for opening VS Code in dev container mode.
  • Updating the CLI command implementation to handle container-based logic and URL link generation for dev containers.

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

FileDescription
docs/reference/cli/open_vscode.mdAdded documentation for the new container flag.
cli/open_test.goIntroduced new tests for dev container support and behavior.
cli/open.goImplemented container flag handling and URL building tailored for dev containers.
Files not reviewed (1)
  • cli/testdata/coder_open_vscode_--help.golden: Language not supported
Comments suppressed due to low confidence (1)

cli/open.go:145

  • Consider including the specified container name in the error message (e.g., 'no container found matching ') for improved clarity.
if (!foundContainer) {

@DanielleMaywoodDanielleMaywood marked this pull request as ready for reviewApril 3, 2025 08:08
Copy link
Member

@johnstcnjohnstcn left a comment

Choose a reason for hiding this comment

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

Nice tests!

cli/open.go Outdated
Comment on lines 131 to 133
if !ok {
return xerrors.New("container missing `devcontainer.local_folder` label")
}
Copy link
Member

Choose a reason for hiding this comment

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

This shouldn't happenin theory, but no harm to check.

DanielleMaywood reacted with thumbs up emoji
- Invert an if-condition to reduce how nested the code was.- Hide `-c` flag for now
Copy link
Member

@mafredrimafredri left a comment

Choose a reason for hiding this comment

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

Nice change and tests!

@DanielleMaywoodDanielleMaywood merged commitaa3d71d intomainApr 3, 2025
29 checks passed
@DanielleMaywoodDanielleMaywood deleted the dm-open-devcontainer-cli branchApril 3, 2025 09:21
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsApr 3, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@mafredrimafredrimafredri approved these changes

Copilot code reviewCopilotCopilot left review comments

@johnstcnjohnstcnjohnstcn approved these changes

Assignees

@DanielleMaywoodDanielleMaywood

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

CLI: supportcoder open vscode <workspace> -c devcontainer
3 participants
@DanielleMaywood@mafredri@johnstcn

[8]ページ先頭

©2009-2025 Movatter.jp