X Tutup
Skip to content

Commit 5bf185c

Browse files
authored
Merge pull request cli#4538 from cli/mm-codespaces-remove-friendly-machine-name
Removing "friendly" machine name from prompt
2 parents b513929 + e923eb8 commit 5bf185c

File tree

3 files changed

+1
-8
lines changed

3 files changed

+1
-8
lines changed

go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ require (
1212
github.com/cli/safeexec v1.0.0
1313
github.com/cpuguy83/go-md2man/v2 v2.0.1
1414
github.com/creack/pty v1.1.17
15-
github.com/fatih/camelcase v1.0.0
1615
github.com/gabriel-vasile/mimetype v1.4.0
1716
github.com/google/go-cmp v0.5.6
1817
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,6 @@ github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5y
106106
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
107107
github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
108108
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
109-
github.com/fatih/camelcase v1.0.0 h1:hxNvNX/xYBp0ovncs8WyWZrOrpBNub/JfaMvbURyft8=
110-
github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc=
111109
github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=
112110
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
113111
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=

pkg/cmd/codespace/create.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,11 @@ import (
55
"errors"
66
"fmt"
77
"os"
8-
"strings"
98

109
"github.com/AlecAivazis/survey/v2"
1110
"github.com/cli/cli/v2/internal/codespaces"
1211
"github.com/cli/cli/v2/internal/codespaces/api"
1312
"github.com/cli/cli/v2/pkg/cmd/codespace/output"
14-
"github.com/fatih/camelcase"
1513
"github.com/spf13/cobra"
1614
)
1715

@@ -266,9 +264,7 @@ func getMachineName(ctx context.Context, apiClient apiClient, repoID int, machin
266264
machineNames := make([]string, 0, len(machines))
267265
machineByName := make(map[string]*api.Machine)
268266
for _, m := range machines {
269-
nameParts := camelcase.Split(m.Name)
270-
machineName := strings.Title(strings.ToLower(nameParts[0]))
271-
machineName = fmt.Sprintf("%s - %s", machineName, m.DisplayName)
267+
machineName := m.DisplayName
272268
machineNames = append(machineNames, machineName)
273269
machineByName[machineName] = m
274270
}

0 commit comments

Comments
 (0)
X Tutup