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 6e90b20
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions 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 @@ -51,6 +52,7 @@ func CmdCreateUsage(cmd *kingpin.CmdClause, opts *CreateOptions) error {
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 Expand Up @@ -91,6 +93,7 @@ func CmdCreate(o *oreo.Client, globals *jiracli.GlobalOptions, opts *CreateOptio
Overrides: opts.Overrides,
}
input.Overrides["project"] = opts.Project
input.Overrides["summary"] = opts.Summary
input.Overrides["issuetype"] = opts.IssueType
input.Overrides["login"] = globals.Login.Value

Expand Down

0 comments on commit 6e90b20

Please sign in to comment.