Skip to content

Commit

Permalink
Merge pull request #104 from johnmanjiro13/refactor/use-var-withou-sh…
Browse files Browse the repository at this point in the history
…orthand

refactor: Use `Var` function for flags which don't have shorthand
  • Loading branch information
johnmanjiro13 committed Oct 9, 2023
2 parents dc3001d + 7dc32ce commit f058d60
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions root.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ func NewRootCmd(bumper Bumper) *cobra.Command {
cmd.Flags().StringVarP(&repository, "repo", "R", "", "Select another repository using the [HOST/]OWNER/REPO format")
cmd.Flags().BoolVarP(&isDraft, "draft", "d", false, "Save the release as a draft instead of publishing it")
cmd.Flags().BoolVarP(&isPrerelease, "prerelease", "p", false, "Mark the release as a prerelease")
cmd.Flags().StringVarP(&discussionCategory, "discussion-category", "", "", "Start a discussion of the specified category")
cmd.Flags().StringVar(&discussionCategory, "discussion-category", "", "Start a discussion of the specified category")
cmd.Flags().BoolVarP(&generateNotes, "generate-notes", "g", false, "Automatically generate title and notes for the release")
cmd.Flags().StringVarP(&notes, "notes", "n", "", "Release notes")
cmd.Flags().StringVarP(&notesFile, "notes-file", "F", "", "Read release notes from file")
cmd.Flags().StringVarP(&target, "target", "", "", "Target branch or full commit SHA (default: main branch)")
cmd.Flags().StringVar(&target, "target", "", "Target branch or full commit SHA (default: main branch)")
cmd.Flags().StringVarP(&title, "title", "t", "", "Release title")
cmd.Flags().StringVarP(&bumpType, "bump-type", "", "", "Bump type (major, minor or patch)")
cmd.Flags().StringVar(&bumpType, "bump-type", "", "Bump type (major, minor or patch)")
cmd.Flags().BoolVarP(&yes, "yes", "y", false, "Answer 'yes' to all questions")
return cmd
}

0 comments on commit f058d60

Please sign in to comment.