Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
profclems committed May 25, 2021
1 parent 42a7d4c commit c99798a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
6 changes: 4 additions & 2 deletions commands/release/list/release_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@ func NewCmdReleaseList(f *cmdutils.Factory) *cobra.Command {
}
releaseListCmd.Flags().StringP("tag", "t", "", "Filter releases by tag <name>")
// deprecate in favour of the `release view` command
releaseListCmd.Flags().MarkDeprecated("tag", "use `glab release view <tag>` instead")
_ = releaseListCmd.Flags().MarkDeprecated("tag", "use `glab release view <tag>` instead")

// make it hidden but still accessible
// TODO: completely remove before a major release (v2.0.0+)
releaseListCmd.Flags().MarkHidden("tag")
_ = releaseListCmd.Flags().MarkHidden("tag")

return releaseListCmd
}

Expand Down
2 changes: 1 addition & 1 deletion commands/release/releaseutils/releaseutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func RenderReleaseAssertLinks(assets []*gitlab.ReleaseLink) string {
}
t := tableprinter.NewTablePrinter()
for _, asset := range assets {
t.AddRow(asset.Name, asset.LinkType, asset.DirectAssetURL)
t.AddRow(asset.Name, asset.DirectAssetURL)
//assetsPrint += asset.DirectAssetURL + "\n"
}
return t.String()
Expand Down
7 changes: 4 additions & 3 deletions commands/release/view/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package view

import (
"fmt"

"github.com/MakeNowJust/heredoc"
"github.com/profclems/glab/commands/cmdutils"
"github.com/profclems/glab/commands/release/releaseutils"
Expand All @@ -15,7 +16,7 @@ import (
)

type ViewOpts struct {
TagName string
TagName string
OpenInBrowser bool

IO *iostreams.IOStreams
Expand Down Expand Up @@ -84,7 +85,7 @@ func deleteRun(opts *ViewOpts) error {
if opts.TagName == "" {
tags, resp, err := client.Tags.ListTags(repo.FullName(), &gitlab.ListTagsOptions{
OrderBy: gitlab.String("updated"),
Sort: gitlab.String("desc"),
Sort: gitlab.String("desc"),
})
if err != nil && resp != nil && resp.StatusCode != 404 {
return cmdutils.WrapError(err, "could not fetch tag")
Expand All @@ -109,7 +110,7 @@ func deleteRun(opts *ViewOpts) error {
repo.FullName(), release.TagName)

if opts.IO.IsOutputTTY() {
opts.IO.Logf("Opening %s in your browser.\n", release)
opts.IO.Logf("Opening %s in your browser.\n", url)
}

browser, _ := cfg.Get(repo.RepoHost(), "browser")
Expand Down

0 comments on commit c99798a

Please sign in to comment.