-
-
Notifications
You must be signed in to change notification settings - Fork 163
Conversation
Usage: glab project view [repository] [--web] Will either display project name, description and README or open the URL in the default browser. If repository is not informed it will try to get from current git and will use current branch.
bf82677
to
db2b031
Compare
Codecov Report
@@ Coverage Diff @@
## trunk #778 +/- ##
==========================================
- Coverage 58.47% 58.34% -0.14%
==========================================
Files 93 93
Lines 6681 6696 +15
==========================================
Hits 3907 3907
- Misses 2395 2409 +14
- Partials 379 380 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @brodock for working on this! This is great!
Just some few stuff to fix up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good! Thanks a lot @brodock
I've made it into a draft as I found a few edge cases, I will be looking at it tomorrow. |
This will make the readme be displayed with the same spacing whether description is present or not.
@profclems this is ready for review again |
Adding support for allowing users enter full URLs to project path. This will allows users override the repo host and protocol. Examples: - glab repo view [email protected]:profclems/glab.git - glab repo view https://gitlab.company.org/user/repo - glab repo view https://gitlab.company.org/user/repo.git
I have added a few commits to add support for full URLs to allow users specify the repo [git] url as argument. This will allows users override the repo host and protocol. Examples:
|
@profclems I've tested the last changes, and it seems it added an unexpected behavior: when I type I will make a new PR to fix this. |
Description
Adds
glab project view [repository] [flags]
command.View, will render project name, description and README. Optionally you can pass
--web
and it will open the project in your default browser instead.If you don't pass a
repository
path, it will try to infer based on current git repository. If it finds, it will also use current branch to retrieve the README from, or to open the browser project page within that branch.It also accepts just a repository name without a namespace, in which it will use your own username as the namespace.
Ex:
glab project view glab
will open thebrodock/glab
in my case.Related Issue
Resolves #777
How Has This Been Tested?
I've only tested this manually. Will work on adding go tests.
Screenshots (if appropriate):
Types of changes