Conversation
vilmibm
left a comment
There was a problem hiding this comment.
thanks for this! Just the one comment about baserepo, otherwise 👍 . Thanks for including tests!
command/repo.go
Outdated
|
|
||
| func repoView(cmd *cobra.Command, args []string) error { | ||
| ctx := contextForCommand(cmd) | ||
| baseRepo, err := ctx.BaseRepo() |
There was a problem hiding this comment.
I think for consistency this should use the new determineBaseRepo helper
There was a problem hiding this comment.
Sounds great, updated.
``` $ gh repo Work with GitHub repositories. A repository can be supplied as an argument in any of the following formats: - by owner/repo, e.g. "cli/cli" - by URL, e.g. "https://github.com/cli/cli" Usage: gh repo [command] Available Commands: view View a repository in the browser ```
|
@vilmibm This should be good to go now. |
|
Is it possible to alias this to |
mislav
left a comment
There was a problem hiding this comment.
Thank you! Added a few tweaks, but otherwise looked great.
vilmibm
left a comment
There was a problem hiding this comment.
This needs support for viewing a repo in the command line (like --preview for other things); but since we're discussing making that the default (and switching to --web) that can be follow-up work.
Adds support
gh repo viewdiscussed in #307. It supports no args to open current repo currently in, owner/repo and full url.I wasn't sure how much validation I should do around owner/repo or URL. Any advice here is greatly welcomed.
ps. this is my first time working in go. looking for as much feedback as possible. thanks