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 {
|
||||
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)
|
||||
@@ -94,16 +95,25 @@ func CmdCreate(o *oreo.Client, globals *jiracli.GlobalOptions, opts *CreateOptio
|
||||
input.Overrides["login"] = globals.Login.Value
|
||||
|
||||
var issueResp *jiradata.IssueCreateResponse
|
||||
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
|
||||
var fnameOptsFile string
|
||||
fnameOptsFile = opts.File.String()
|
||||
if fnameOptsFile != "" {
|
||||
err = jiracli.ReadYmlInputFile(&opts.CommonOptions, &input, &issueUpdate, func() error {
|
||||
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)
|
||||
return err
|
||||
})
|
||||
issueResp, err = jira.CreateIssue(o, globals.Endpoint.Value, &issueUpdate)
|
||||
return err
|
||||
})
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user