Merge pull request #1107 from vilmibm/move-credits
minor credits polish
This commit is contained in:
commit
28f91cbed8
3 changed files with 45 additions and 13 deletions
|
|
@ -38,6 +38,9 @@ func init() {
|
|||
|
||||
repoCmd.AddCommand(repoViewCmd)
|
||||
repoViewCmd.Flags().BoolP("web", "w", false, "Open a repository in the browser")
|
||||
|
||||
repoCmd.AddCommand(repoCreditsCmd)
|
||||
repoCreditsCmd.Flags().BoolP("static", "s", false, "Print a static version of the credits")
|
||||
}
|
||||
|
||||
var repoCmd = &cobra.Command{
|
||||
|
|
@ -92,6 +95,19 @@ With '--web', open the repository in a web browser instead.`,
|
|||
RunE: repoView,
|
||||
}
|
||||
|
||||
var repoCreditsCmd = &cobra.Command{
|
||||
Use: "credits [<repository>]",
|
||||
Short: "View credits for a repository",
|
||||
Example: `$ gh repo credits # view credits for the current repository
|
||||
$ gh repo credits cool/repo # view credits for cool/repo
|
||||
$ gh repo credits -s # print a non-animated thank you
|
||||
$ gh repo credits | cat # pipe to just print the contributors, one per line
|
||||
`,
|
||||
Args: cobra.MaximumNArgs(1),
|
||||
RunE: repoCredits,
|
||||
Hidden: true,
|
||||
}
|
||||
|
||||
func parseCloneArgs(extraArgs []string) (args []string, target string) {
|
||||
args = extraArgs
|
||||
|
||||
|
|
@ -597,3 +613,7 @@ func repoView(cmd *cobra.Command, args []string) error {
|
|||
|
||||
return nil
|
||||
}
|
||||
|
||||
func repoCredits(cmd *cobra.Command, args []string) error {
|
||||
return credits(cmd, args)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue