profclems / glab

The GitLab CLI tool. Archived: now officially adopted by GitLab as the official CLI tool and maintained at https://gitlab.com/gitlab-org/cli. See https://github.com/profclems/glab/issues/983
https://glab.readthedocs.io/
MIT License
2.08k stars 163 forks source link

fix: copypasta errors for `glab issue view --help` #973

Closed justin-f-perez closed 2 years ago

justin-f-perez commented 2 years ago

Fix glab issue view --help descriptions in FLAGS section for --comments and --web (mr -> issue)

Description

Fix glab issue view --help descriptions in FLAGS section for --comments and --web (mr -> issue)

Related Issue

Resolves #972

How Has This Been Tested?

test command

❯ git grep -E 'issue.*mr'

before

commands/issue/create/issue_create.go:73:                       $ glab issue new -t "Fix CVE-YYYY-XXXX" -l security --linked-mr 123
commands/issue/create/issue_create.go:132:      issueCreateCmd.Flags().IntVarP(&opts.LinkedMR, "linked-mr", "", 0, "The IID of a merge request in which to resolve all issues")
commands/issue/view/issue_view.go:107:  issueViewCmd.Flags().BoolVarP(&opts.ShowComments, "comments", "c", false, "Show mr comments and activities")
commands/issue/view/issue_view.go:109:  issueViewCmd.Flags().BoolVarP(&opts.Web, "web", "w", false, "Open mr in a browser. Uses default browser or browser specified in BROWSER variable")
commands/mr/issues/mr_issues.go:55:                     fmt.Fprintf(f.IO.StdOut, "%s\n%s\n", title.Describe(), issueutils.DisplayIssueList(f.IO, mrIssues, repo.FullName()))
docs/source/issue/create.rst:26:  $ glab issue new -t "Fix CVE-YYYY-XXXX" -l security --linked-mr 123

It appears that beside the auto-generated docs, there were no other places with similar changes to make. issue_create.go:73,132 matches the 'test grep' because --linked-mr, so this is good, and similarly mr_issues.go:55 appears intentional. So at least there is no other low hanging fruit

Screenshots (if appropriate)

Types of changes

codecov[bot] commented 2 years ago

Codecov Report

Merging #973 (b120f16) into trunk (ce81f27) will decrease coverage by 0.01%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##            trunk     #973      +/-   ##
==========================================
- Coverage   59.51%   59.50%   -0.02%     
==========================================
  Files          97       97              
  Lines        7687     7689       +2     
==========================================
  Hits         4575     4575              
- Misses       2702     2704       +2     
  Partials      410      410              
Impacted Files Coverage Δ
commands/issue/view/issue_view.go 86.76% <100.00%> (ø)
commands/mr/create/mr_create.go 31.38% <0.00%> (-0.15%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ce81f27...b120f16. Read the comment docs.

justin-f-perez commented 2 years ago

Oops... just noticed there's some documentation to update as well. will amend commit and push