pub fn delete_label(slug: &str, name: &str) -> Result<()>Expand description
Delete one label on the remote via gh label delete --yes. Used
by gwm labels push --prune for labels declared on the remote but
not in .gwm.toml.
Validates name through crate::labels::validate_label_name
BEFORE shelling out (issue #100). The argv-injection vector that
motivates validate_label_name for declared labels (config side)
applies equally to the prune path: gh label delete <name> takes
the name positionally, so a remote label whose name starts with
- (planted by an attacker who can edit the upstream label set,
or by an unrelated tool predating the validator) would be parsed
as a flag — -h no-ops the delete with a help banner, --repo other/repo retargets the operation. We refuse the prune with a
scoped error instead of running the risky argv.