Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions context/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ func (r *ResolvedRemotes) BaseRepo(io *iostreams.IOStreams) (ghrepo.Interface, e

baseName := repoNames[0]
if len(repoNames) > 1 {
// hide the spinner in case a command started the progress indicator before base repo was fully
// resolved, e.g. in `gh issue view`
io.StopProgressIndicator()
err := prompt.SurveyAskOne(&survey.Select{
Message: "Which should be the base repository (used for e.g. querying issues) for this directory?",
Options: repoNames,
Expand Down
4 changes: 2 additions & 2 deletions internal/codespaces/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ type CodespaceMachine struct {
Name string `json:"name"`
DisplayName string `json:"display_name"`
OperatingSystem string `json:"operating_system"`
StorageInBytes int `json:"storage_in_bytes"`
MemoryInBytes int `json:"memory_in_bytes"`
StorageInBytes uint64 `json:"storage_in_bytes"`
MemoryInBytes uint64 `json:"memory_in_bytes"`
CPUCount int `json:"cpus"`
}

Expand Down
18 changes: 14 additions & 4 deletions pkg/cmd/codespace/ports.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ import (
"golang.org/x/sync/errgroup"
)

const (
vscodeServerPortName = "VSCodeServerInternal"
codespacesInternalPortName = "CodespacesInternal"
)

// newPortsCmd returns a Cobra "ports" command that displays a table of available ports,
// according to the specified flags.
func newPortsCmd(app *App) *cobra.Command {
Expand Down Expand Up @@ -74,13 +79,18 @@ func (a *App) ListPorts(ctx context.Context, codespaceName string, exporter cmdu
a.errLogger.Printf("Failed to get port names: %v", devContainerResult.err.Error())
}

portInfos := make([]*portInfo, len(ports))
for i, p := range ports {
portInfos[i] = &portInfo{
var portInfos []*portInfo

for _, p := range ports {
// filter out internal ports from list
if strings.HasPrefix(p.SessionName, vscodeServerPortName) || strings.HasPrefix(p.SessionName, codespacesInternalPortName) {
continue
}
portInfos = append(portInfos, &portInfo{
Port: p,
codespace: codespace,
devContainer: devContainerResult.devContainer,
}
})
}

if err := a.io.StartPager(); err != nil {
Expand Down