const mainCommand = pipe(
Command.make("git-create-jira-branch", {
options: Options.all({
baseBranch: Options.withDescription(
Options.optional(Options.alias(Options.text("baseBranch"), "b")),
"Base branch to create the new branch from"
),
version: Options.withDescription(
Options.alias(Options.boolean("version"), "v"),
"Show version information"
),
help: Options.withDescription(
Options.alias(Options.boolean("help"), "h"),
"Show this help text"
),
}),
args: Args.addDescription(
Args.atMost(Args.text({ name: "jira-key" }), 1),
"The Jira ticket key to create a branch for (e.g. FOOX-1234)"
),
}),
Command.map((args) => {
return GitCreateJiraBranch({
version: args.options.version,
baseBranch: args.options.baseBranch,
jiraKey: get(args.args, 0),
});
})
);
const mainCommand = pipe(
Command.make("git-create-jira-branch", {
options: Options.all({
baseBranch: Options.withDescription(
Options.optional(Options.alias(Options.text("baseBranch"), "b")),
"Base branch to create the new branch from"
),
version: Options.withDescription(
Options.alias(Options.boolean("version"), "v"),
"Show version information"
),
help: Options.withDescription(
Options.alias(Options.boolean("help"), "h"),
"Show this help text"
),
}),
args: Args.addDescription(
Args.atMost(Args.text({ name: "jira-key" }), 1),
"The Jira ticket key to create a branch for (e.g. FOOX-1234)"
),
}),
Command.map((args) => {
return GitCreateJiraBranch({
version: args.options.version,
baseBranch: args.options.baseBranch,
jiraKey: get(args.args, 0),
});
})
);