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

remove --branch on project browse command, as it is redundant with --ref #873

Closed sding3 closed 1 year ago

sding3 commented 1 year ago

This updates amends #869 by removing the --branch option, allowing the --ref option to be able to take in git branch, tag, or SHA. This updates also makes the --ref option orthogonal to the --file.

To test this update, target the zaquestion/test repo hosted on gitlab with various command invocations:

lab project browse
lab project browse --ref master
lab project browse --ref v0.1
lab project browse --ref 63cce1d0
lab project browse --ref master --file .gitlab-ci.yml
lab project browse --ref v0.1 --file .gitlab-ci.yml
lab project browse --ref 63cce1d0 --file .gitlab-ci.yml
sding3 commented 1 year ago

@prarit - I didn't explain my thought well in this thread. Maybe a concrete PR here can help explain better.

cc: @zampierilucas @claytonrcarter

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.02 :tada:

Comparison is base (2bbd110) 55.56% compared to head (9a8d0d2) 55.59%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #873 +/- ## ========================================== + Coverage 55.56% 55.59% +0.02% ========================================== Files 82 82 Lines 5977 5972 -5 ========================================== - Hits 3321 3320 -1 + Misses 2367 2364 -3 + Partials 289 288 -1 ``` | [Impacted Files](https://app.codecov.io/gh/zaquestion/lab/pull/873?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zaq%3F+Wiedmann) | Coverage Δ | | |---|---|---| | [cmd/project\_browse.go](https://app.codecov.io/gh/zaquestion/lab/pull/873?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zaq%3F+Wiedmann#diff-Y21kL3Byb2plY3RfYnJvd3NlLmdv) | `100.00% <100.00%> (ø)` | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/zaquestion/lab/pull/873/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.