Skip to main content

label_create_argv

Function label_create_argv 

Source
pub fn label_create_argv(slug: &str, spec: &LabelSpec) -> Vec<String>
Expand description

Argv for gh label create <name> --color <hex> [--description <desc>] --force --repo <slug>. The --force flag is the key contract bit: GitHub’s CLI uses it to mean “create OR update”, which is exactly what gwm labels push needs (no separate “edit” call). When description is None we omit the flag entirely rather than pass "" — gh would otherwise wipe an existing description that the user didn’t intend to touch.