Skip to content

Commit

Permalink
feat(create): allow setting summary
Browse files Browse the repository at this point in the history
shamelessly taken from his fork

a part of me going through all of the forks and pulling all of the
useful info out

Co-authored-by: Ben Cordero <[email protected]>
  • Loading branch information
georgettica and bencord0 committed Dec 5, 2021
1 parent 07bd89a commit fff11e0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jiracmd/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ type CreateOptions struct {
jiracli.CommonOptions `yaml:",inline" json:",inline" figtree:",inline"`
jiradata.IssueUpdate `yaml:",inline" json:",inline" figtree:",inline"`
Project string `yaml:"project,omitempty" json:"project,omitempty"`
Summary string `yaml:"summary,omitempty" json:"summary`
IssueType string `yaml:"issuetype,omitempty" json:"issuetype,omitempty"`
Overrides map[string]string `yaml:"overrides,omitempty" json:"overrides,omitempty"`
SaveFile string `yaml:"savefile,omitempty" json:"savefile,omitempty"`
Expand Down Expand Up @@ -47,10 +48,10 @@ func CmdCreateRegistry() *jiracli.CommandRegistryEntry {
func CmdCreateUsage(cmd *kingpin.CmdClause, opts *CreateOptions) error {
jiracli.BrowseUsage(cmd, &opts.CommonOptions)
jiracli.EditorUsage(cmd, &opts.CommonOptions)
jiracli.FileUsage(cmd, &opts.CommonOptions)
jiracli.TemplateUsage(cmd, &opts.CommonOptions)
cmd.Flag("noedit", "Disable opening the editor").SetValue(&opts.SkipEditing)
cmd.Flag("project", "project to create issue in").Short('p').StringVar(&opts.Project)
cmd.Flag("summary", "Summary of the issue").Short('s').StringVar(&opts.Summary)
cmd.Flag("issuetype", "issuetype in to create").Short('i').StringVar(&opts.IssueType)
cmd.Flag("comment", "Comment message for issue").Short('m').PreAction(func(ctx *kingpin.ParseContext) error {
opts.Overrides["comment"] = jiracli.FlagValue(ctx, "comment")
Expand Down

0 comments on commit fff11e0

Please sign in to comment.