Add standalone create-jira command structure
This commit is contained in:
parent
a2f220d5eb
commit
425590cc9a
2 changed files with 40 additions and 0 deletions
|
@ -45,6 +45,7 @@ Use "campaigner [command] --help" for more information about a command.
|
||||||
`--grep` and `--govet` flags to distinguish how to parse the
|
`--grep` and `--govet` flags to distinguish how to parse the
|
||||||
input.
|
input.
|
||||||
- [ ] Add `standalone` group of commands.
|
- [ ] Add `standalone` group of commands.
|
||||||
|
- [ ] Parametrise the atlassian API url.
|
||||||
- [ ] Add file only mode to the `add` command.
|
- [ ] Add file only mode to the `add` command.
|
||||||
- [ ] Add file path normalisation to the `add` command.
|
- [ ] Add file path normalisation to the `add` command.
|
||||||
- [ ] Add `--ag` to the `add` command.
|
- [ ] Add `--ag` to the `add` command.
|
||||||
|
|
39
cmd/standalone.go
Normal file
39
cmd/standalone.go
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
package cmd
|
||||||
|
|
||||||
|
func StandaloneCmd() *cobra.Command {
|
||||||
|
cmd := &cobra.Command{
|
||||||
|
Use: "standalone",
|
||||||
|
Short: "Standalone fire-and-forget commands",
|
||||||
|
}
|
||||||
|
|
||||||
|
cmd.AddCommand(
|
||||||
|
CreateJiraTicketStandaloneCmd(),
|
||||||
|
)
|
||||||
|
|
||||||
|
return cmd
|
||||||
|
}
|
||||||
|
|
||||||
|
func CreateJiraTicketStandaloneCmd() *cobra.Command{
|
||||||
|
cmd := &cobra.Command{
|
||||||
|
Use: "create-jira-ticket",
|
||||||
|
Short: "Creates a jira ticket from a template",
|
||||||
|
Args: cobra.NoArgs,
|
||||||
|
Run: createJiraTicketStandaloneCmdF,
|
||||||
|
}
|
||||||
|
|
||||||
|
cmd.Flags().StringP("username", "u", "", "the jira username")
|
||||||
|
_ = cmd.MarkFlagRequired("username")
|
||||||
|
cmd.Flags().StringP("token", "t", "", "the jira token")
|
||||||
|
_ = cmd.MarkFlagRequired("token")
|
||||||
|
cmd.Flags().StringP("summary", "s", "", "the summary of the ticket")
|
||||||
|
_ = cmd.MarkFlagRequired("summary")
|
||||||
|
cmd.Flags().StringP("template", "m", "", "the template to render the description of the ticket")
|
||||||
|
_ = cmd.MarkFlagRequired("template")
|
||||||
|
cmd.Flags().StringSliceP("vars", "v", "", "the variables to use in the template")
|
||||||
|
|
||||||
|
return cmd
|
||||||
|
}
|
||||||
|
|
||||||
|
func createJiraTicketStandaloneCmdF(cmd *cobra.Command, _ []string) {
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in a new issue