Shortens the command documentation
This commit is contained in:
parent
54a26c7297
commit
5dde18d3ae
9 changed files with 41 additions and 26 deletions
|
@ -77,7 +77,8 @@ func CsvAddCmd() *cobra.Command {
|
|||
func AddCmd() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "add",
|
||||
Short: "Adds tickets to the campaign from the output of grep/ag/govet",
|
||||
Short: "Adds tickets to the campaign",
|
||||
Long: "Adds tickets to the campaign from the output of grep/ag/govet",
|
||||
}
|
||||
|
||||
cmd.AddCommand(
|
||||
|
|
|
@ -15,7 +15,8 @@ import (
|
|||
func InitCmd() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "init",
|
||||
Short: "Creates a new campaign in the current directory",
|
||||
Short: "Creates a campaign",
|
||||
Long: "Creates a new campaign in the current directory",
|
||||
Example: ` campaigner init \
|
||||
--jira-username johndoe \
|
||||
--jira-token secret \
|
||||
|
|
|
@ -43,7 +43,8 @@ func GithubPublishCmd() *cobra.Command {
|
|||
func PublishCmd() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "publish",
|
||||
Short: "Publishes the campaign tickets in different providers",
|
||||
Short: "Publishes campaign tickets",
|
||||
Long: "Publishes the campaign tickets in both Jira and Github",
|
||||
}
|
||||
|
||||
cmd.AddCommand(
|
||||
|
|
|
@ -15,7 +15,7 @@ func RootCmd() *cobra.Command {
|
|||
|
||||
cmd.AddCommand(
|
||||
AddCmd(),
|
||||
FilterCmd(),
|
||||
// FilterCmd(),
|
||||
InitCmd(),
|
||||
StatusCmd(),
|
||||
PublishCmd(),
|
||||
|
|
|
@ -9,7 +9,8 @@ import (
|
|||
func StatusCmd() *cobra.Command {
|
||||
return &cobra.Command{
|
||||
Use: "status",
|
||||
Short: "Prints the current status of the campaign",
|
||||
Short: "Prints the campaign status",
|
||||
Long: "Prints the current status of the campaign and its tickets",
|
||||
Args: cobra.NoArgs,
|
||||
Run: statusCmdF,
|
||||
}
|
||||
|
@ -21,5 +22,5 @@ func statusCmdF(cmd *cobra.Command, _ []string) {
|
|||
ErrorAndExit(cmd, err)
|
||||
}
|
||||
|
||||
cmp.PrintStatus(cmd.OutOrStdout())
|
||||
cmp.PrintStatus()
|
||||
}
|
||||
|
|
|
@ -7,11 +7,16 @@ import (
|
|||
func SyncCmd() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "sync",
|
||||
Short: "Synchronizes the status of the tickets with remote providers",
|
||||
Short: "Syncs the tickets",
|
||||
Long: "Synchronizes the status of the published tickets with remote providers",
|
||||
Args: cobra.NoArgs,
|
||||
Run: syncCmdF,
|
||||
}
|
||||
|
||||
cmd.Flags().BoolP("all", "a", false, "syncs all the published tickets")
|
||||
cmd.Flags().StringP("jira-issue", "j", "", "syncs a ticket by Jira issue number")
|
||||
cmd.Flags().StringP("github-issue", "g", "", "syncs a ticket by GitHub issue number")
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue