mirror of
https://github.com/Threnklyn/jira.git
synced 2026-06-06 21:20:48 +02:00
allow issues on command line to automatically prefix with project when defined
This commit is contained in:
@@ -15,6 +15,7 @@ import (
|
||||
type BlockOptions struct {
|
||||
jiracli.CommonOptions `yaml:",inline" json:",inline" figtree:",inline"`
|
||||
jiradata.LinkIssueRequest `yaml:",inline" json:",inline" figtree:",inline"`
|
||||
Project string `yaml:"project,omitempty" json:"project,omitempty"`
|
||||
}
|
||||
|
||||
func CmdBlockRegistry() *jiracli.CommandRegistryEntry {
|
||||
@@ -38,6 +39,8 @@ func CmdBlockRegistry() *jiracli.CommandRegistryEntry {
|
||||
return CmdBlockUsage(cmd, &opts)
|
||||
},
|
||||
func(o *oreo.Client, globals *jiracli.GlobalOptions) error {
|
||||
opts.OutwardIssue.Key = jiracli.FormatIssue(opts.OutwardIssue.Key, opts.Project)
|
||||
opts.InwardIssue.Key = jiracli.FormatIssue(opts.InwardIssue.Key, opts.Project)
|
||||
return CmdBlock(o, globals, &opts)
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user