Skip to content

Commit

Permalink
Added command explanations
Browse files Browse the repository at this point in the history
  • Loading branch information
craftamap committed Oct 29, 2020
1 parent 654dc6e commit 12c0a68
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 6 deletions.
3 changes: 2 additions & 1 deletion cmd/commands/pr/create/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ var (

func Add(prCmd *cobra.Command, globalOpts *options.GlobalOptions) {
createCmd := &cobra.Command{
Use: "create",
Use: "create",
Short: "Create a pull request",
Run: func(cmd *cobra.Command, args []string) {
var (
sourceBranch string
Expand Down
4 changes: 3 additions & 1 deletion cmd/commands/pr/list/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ import (

func Add(prCmd *cobra.Command, globalOpts *options.GlobalOptions) {
listCmd := &cobra.Command{
Use: "list",
Use: "list",
Short: "List and filter pull requests in this repository",
Long: "List and filter pull requests in this repository",
Run: func(cmd *cobra.Command, args []string) {
c := internal.Client{
Username: globalOpts.Username,
Expand Down
4 changes: 3 additions & 1 deletion cmd/commands/pr/pr.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ import (

func Add(rootCmd *cobra.Command, globalOpts *options.GlobalOptions) {
prCommand := cobra.Command{
Use: "pr",
Use: "pr",
Long: "Work with pull requests",
Short: "Manage pull requests",
}

list.Add(&prCommand, globalOpts)
Expand Down
4 changes: 3 additions & 1 deletion cmd/commands/pr/statuses/statuses.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ import (

func Add(prCmd *cobra.Command, globalOpts *options.GlobalOptions) {
statusesCmd := &cobra.Command{
Use: "statuses",
Use: "statuses",
Short: "Show CI status for a single pull request",
Long: "Show CI status for a single pull request",
Run: func(cmd *cobra.Command, args []string) {
var id int
var err error
Expand Down
4 changes: 3 additions & 1 deletion cmd/commands/pr/view/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ import (

func Add(prCmd *cobra.Command, globalOpts *options.GlobalOptions) {
viewCmd := &cobra.Command{
Use: "view",
Use: "view",
Short: "View a pull request",
Long: "Display the title, body, and other information about a pull request.",
Run: func(cmd *cobra.Command, args []string) {
var id int
var err error
Expand Down
5 changes: 4 additions & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ import (

var (
rootCmd = &cobra.Command{
Use: "bb",
Use: "bb",
Short: "Bitbucket.org CLI",
Long: "Work seamlessly with Bitbucket.org from the command line.",
Example: `$ bb pr list`,
PersistentPreRun: func(cmd *cobra.Command, args []string) {
viper.Unmarshal(&globalOpts)
},
Expand Down

0 comments on commit 12c0a68

Please # to comment.