Skip to content

Commit af849ca

Browse files
committed
Remove update check from extension list
1 parent 5772c09 commit af849ca

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

pkg/cmd/extension/command.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,10 @@ func NewCmdExtension(f *cmdutil.Factory) *cobra.Command {
4545
Aliases: []string{"ls"},
4646
Args: cobra.NoArgs,
4747
RunE: func(cmd *cobra.Command, args []string) error {
48-
cmds := m.List(true)
48+
cmds := m.List(false)
4949
if len(cmds) == 0 {
5050
return errors.New("no extensions installed")
5151
}
52-
cs := io.ColorScheme()
5352
t := utils.NewTablePrinter(io)
5453
for _, c := range cmds {
5554
var repo string
@@ -61,11 +60,6 @@ func NewCmdExtension(f *cmdutil.Factory) *cobra.Command {
6160

6261
t.AddField(fmt.Sprintf("gh %s", c.Name()), nil, nil)
6362
t.AddField(repo, nil, nil)
64-
var updateAvailable string
65-
if c.UpdateAvailable() {
66-
updateAvailable = "Upgrade available"
67-
}
68-
t.AddField(updateAvailable, nil, cs.Green)
6963
t.EndRow()
7064
}
7165
return t.Render()

pkg/cmd/extension/command_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,10 +296,12 @@ func TestNewCmdExtension(t *testing.T) {
296296
return []extensions.Extension{ex1, ex2}
297297
}
298298
return func(t *testing.T) {
299-
assert.Equal(t, 1, len(em.ListCalls()))
299+
calls := em.ListCalls()
300+
assert.Equal(t, 1, len(calls))
301+
assert.False(t, calls[0].IncludeMetadata)
300302
}
301303
},
302-
wantStdout: "gh test\tcli/gh-test\t\ngh test2\tcli/gh-test2\tUpgrade available\n",
304+
wantStdout: "gh test\tcli/gh-test\ngh test2\tcli/gh-test2\n",
303305
},
304306
{
305307
name: "create extension interactive",

pkg/extensions/manager_mock.go

Lines changed: 1 addition & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)