Skip to content

Commit e6d8490

Browse files
authored
Fix cmds short descriptions (#72)
1 parent 40750b6 commit e6d8490

File tree

6 files changed

+13
-11
lines changed

6 files changed

+13
-11
lines changed

cmd/build.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ import (
1717
func BuildCmd(fs afero.Fs) *cobra.Command {
1818

1919
buildCmd := &cobra.Command{
20-
Use: "build",
21-
Long: "Create changelog from fragments",
20+
Use: "build",
21+
Short: "Create changelog from fragments",
2222
Args: func(cmd *cobra.Command, args []string) error {
2323
return nil
2424
},

cmd/find_pr.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ argument with commit hash is required
2424

2525
func FindPRCommand(appFs afero.Fs) *cobra.Command {
2626
findPRCommand := &cobra.Command{
27-
Use: "find-pr",
28-
Long: findPRLongDescription,
27+
Use: "find-pr",
28+
Short: "Find the original PR that included a commit",
29+
Long: findPRLongDescription,
2930
Args: func(cmd *cobra.Command, args []string) error {
3031
if len(args) < 1 {
3132
return errListPRCmdMissingCommitHash

cmd/new.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ var errNewCmdMissingArg = errors.New("new requires title argument")
1818
func NewCmd() *cobra.Command {
1919

2020
newCmd := &cobra.Command{
21-
Use: "new title",
22-
Long: "Create a new changelog fragment",
21+
Use: "new title",
22+
Short: "Create a new changelog fragment",
2323
Args: func(cmd *cobra.Command, args []string) error {
2424
if len(args) < 1 {
2525
return errNewCmdMissingArg

cmd/pr_has_fragment.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ var errPrCheckCmdMissingArg = errors.New("pr-has-fragment command requires pr nu
2020

2121
func PrHasFragmentCommand(appFs afero.Fs) *cobra.Command {
2222
prCheckCmd := &cobra.Command{
23-
Use: "pr-has-fragment <pr-number>",
24-
Long: "Check changelog fragment presence in the given PR.",
23+
Use: "pr-has-fragment <pr-number>",
24+
Short: "Check changelog fragment presence in the given PR.",
2525
Args: func(cmd *cobra.Command, args []string) error {
2626
if len(args) < 1 {
2727
return errPrCheckCmdMissingArg

cmd/render.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ import (
1616

1717
func RenderCmd(fs afero.Fs) *cobra.Command {
1818
renderCmd := &cobra.Command{
19-
Use: "render",
20-
Long: "Render a changelog in an asciidoc file",
19+
Use: "render",
20+
Short: "Render a changelog in an asciidoc file",
21+
Long: "Render a changelog in an asciidoc file",
2122
Args: func(cmd *cobra.Command, args []string) error {
2223
return nil
2324
},

cmd/root.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func RootCmd() *cobra.Command {
1616

1717
rootCmd := &cobra.Command{
1818
Use: "elastic-agent-changelog-tool",
19-
Long: "elastic-agent-changelog-tool - Command line tool used for managing the change log for Elastic Agent and related components, including Beats.",
19+
Short: "elastic-agent-changelog-tool - Command line tool used for managing the change log for Elastic Agent and related components, including Beats.",
2020
SilenceUsage: true,
2121
}
2222

0 commit comments

Comments
 (0)