mirror of
https://github.com/Threnklyn/jira.git
synced 2026-06-07 13:33:32 +02:00
fix rebase issue
This commit is contained in:
committed by
Louis DeLosSantos
parent
2c7a9b2830
commit
298a637f8c
+19
-9
@@ -47,6 +47,7 @@ func CmdCreateRegistry() *jiracli.CommandRegistryEntry {
|
|||||||
func CmdCreateUsage(cmd *kingpin.CmdClause, opts *CreateOptions) error {
|
func CmdCreateUsage(cmd *kingpin.CmdClause, opts *CreateOptions) error {
|
||||||
jiracli.BrowseUsage(cmd, &opts.CommonOptions)
|
jiracli.BrowseUsage(cmd, &opts.CommonOptions)
|
||||||
jiracli.EditorUsage(cmd, &opts.CommonOptions)
|
jiracli.EditorUsage(cmd, &opts.CommonOptions)
|
||||||
|
jiracli.FileUsage(cmd, &opts.CommonOptions)
|
||||||
jiracli.TemplateUsage(cmd, &opts.CommonOptions)
|
jiracli.TemplateUsage(cmd, &opts.CommonOptions)
|
||||||
cmd.Flag("noedit", "Disable opening the editor").SetValue(&opts.SkipEditing)
|
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("project", "project to create issue in").Short('p').StringVar(&opts.Project)
|
||||||
@@ -94,16 +95,25 @@ func CmdCreate(o *oreo.Client, globals *jiracli.GlobalOptions, opts *CreateOptio
|
|||||||
input.Overrides["login"] = globals.Login.Value
|
input.Overrides["login"] = globals.Login.Value
|
||||||
|
|
||||||
var issueResp *jiradata.IssueCreateResponse
|
var issueResp *jiradata.IssueCreateResponse
|
||||||
err = jiracli.EditLoop(&opts.CommonOptions, &input, &issueUpdate, func() error {
|
var fnameOptsFile string
|
||||||
if globals.JiraDeploymentType.Value == jiracli.CloudDeploymentType {
|
fnameOptsFile = opts.File.String()
|
||||||
err := fixGDPRUserFields(o, globals.Endpoint.Value, createMeta.Fields, issueUpdate.Fields)
|
if fnameOptsFile != "" {
|
||||||
if err != nil {
|
err = jiracli.ReadYmlInputFile(&opts.CommonOptions, &input, &issueUpdate, func() error {
|
||||||
return err
|
issueResp, err = jira.CreateIssue(o, globals.Endpoint.Value, &issueUpdate)
|
||||||
|
return err
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
err = jiracli.EditLoop(&opts.CommonOptions, &input, &issueUpdate, func() error {
|
||||||
|
if globals.JiraDeploymentType.Value == jiracli.CloudDeploymentType {
|
||||||
|
err := fixGDPRUserFields(o, globals.Endpoint.Value, createMeta.Fields, issueUpdate.Fields)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
issueResp, err = jira.CreateIssue(o, globals.Endpoint.Value, &issueUpdate)
|
||||||
issueResp, err = jira.CreateIssue(o, globals.Endpoint.Value, &issueUpdate)
|
return err
|
||||||
return err
|
})
|
||||||
})
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user