zaquestion / lab

Lab wraps Git or Hub, making it simple to clone, fork, and interact with repositories on GitLab
https://zaquestion.github.io/lab
Creative Commons Zero v1.0 Universal
1.11k stars 102 forks source link

fix(token): Show help when no subcommand given #862

Closed claytonrcarter closed 1 year ago

claytonrcarter commented 1 year ago

Trivial change to bring lab token in line w/ other commands when called w/ no subcommand is given on CLI.

@prarit nice work on the token command, BTW

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 42.62% and project coverage change: -0.63 :warning:

Comparison is base (fd0dccf) 55.88% compared to head (d074861) 55.25%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #862 +/- ## ========================================== - Coverage 55.88% 55.25% -0.63% ========================================== Files 77 82 +5 Lines 5774 5961 +187 ========================================== + Hits 3227 3294 +67 - Misses 2257 2380 +123 + Partials 290 287 -3 ``` | [Impacted Files](https://app.codecov.io/gh/zaquestion/lab/pull/862?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zaq%3F+Wiedmann) | Coverage Δ | | |---|---|---| | [cmd/label\_list.go](https://app.codecov.io/gh/zaquestion/lab/pull/862?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zaq%3F+Wiedmann#diff-Y21kL2xhYmVsX2xpc3QuZ28=) | `100.00% <ø> (+10.81%)` | :arrow_up: | | [internal/config/config.go](https://app.codecov.io/gh/zaquestion/lab/pull/862?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zaq%3F+Wiedmann#diff-aW50ZXJuYWwvY29uZmlnL2NvbmZpZy5nbw==) | `21.29% <0.00%> (-0.82%)` | :arrow_down: | | [internal/gitlab/gitlab.go](https://app.codecov.io/gh/zaquestion/lab/pull/862?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zaq%3F+Wiedmann#diff-aW50ZXJuYWwvZ2l0bGFiL2dpdGxhYi5nbw==) | `8.33% <0.00%> (-0.28%)` | :arrow_down: | | [cmd/token\_revoke.go](https://app.codecov.io/gh/zaquestion/lab/pull/862?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zaq%3F+Wiedmann#diff-Y21kL3Rva2VuX3Jldm9rZS5nbw==) | `11.53% <11.53%> (ø)` | | | [cmd/token\_create.go](https://app.codecov.io/gh/zaquestion/lab/pull/862?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zaq%3F+Wiedmann#diff-Y21kL3Rva2VuX2NyZWF0ZS5nbw==) | `15.62% <15.62%> (ø)` | | | [cmd/token.go](https://app.codecov.io/gh/zaquestion/lab/pull/862?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zaq%3F+Wiedmann#diff-Y21kL3Rva2VuLmdv) | `30.00% <30.00%> (ø)` | | | [cmd/token\_list.go](https://app.codecov.io/gh/zaquestion/lab/pull/862?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zaq%3F+Wiedmann#diff-Y21kL3Rva2VuX2xpc3QuZ28=) | `30.00% <30.00%> (ø)` | | | [cmd/token\_show.go](https://app.codecov.io/gh/zaquestion/lab/pull/862?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zaq%3F+Wiedmann#diff-Y21kL3Rva2VuX3Nob3cuZ28=) | `33.33% <33.33%> (ø)` | | | [cmd/util.go](https://app.codecov.io/gh/zaquestion/lab/pull/862?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zaq%3F+Wiedmann#diff-Y21kL3V0aWwuZ28=) | `72.19% <41.37%> (-2.54%)` | :arrow_down: | | [cmd/mr\_edit.go](https://app.codecov.io/gh/zaquestion/lab/pull/862?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zaq%3F+Wiedmann#diff-Y21kL21yX2VkaXQuZ28=) | `64.07% <66.66%> (ø)` | | | ... and [6 more](https://app.codecov.io/gh/zaquestion/lab/pull/862?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zaq%3F+Wiedmann) | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/zaquestion/lab/pull/862/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zaq%3F+Wiedmann)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.