From d277f399dbe9130f592e58830b1a6c2f99b2802b Mon Sep 17 00:00:00 2001 From: Nikolai Emil Damm Date: Wed, 7 Oct 2026 21:46:51 +0200 Subject: [PATCH] Add a caution to the github-issues remove-all-labels reference Removing all labels was the only destructive label operation in the reference with no stated consequence and no ask-first rule. Deleting a label and replacing the whole label set both carry one. Add the same guidance to the section and to the usage rules. --- skills/github-issues/references/labels.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/skills/github-issues/references/labels.md b/skills/github-issues/references/labels.md index cb4d9747f..e43da5587 100644 --- a/skills/github-issues/references/labels.md +++ b/skills/github-issues/references/labels.md @@ -118,6 +118,10 @@ gh api repos/{owner}/{repo}/issues/{issue_number}/labels \ ## Remove All Labels from an Issue +Removes every label from the issue in one call. Remove all labels only when +explicitly requested. Read the current labels first, and prefer +`--remove-label` otherwise. + ```bash gh api repos/{owner}/{repo}/issues/{issue_number}/labels -X DELETE ``` @@ -149,6 +153,8 @@ gh label list --limit 1000 --json name,isDefault --jq '.[] | select(.isDefault | - Replace an issue's whole label set only when replacement is explicitly requested. Read the current labels first, and prefer add and remove otherwise: `PUT` discards every label not named in the call. +- Remove all of an issue's labels only when that is explicitly requested. Read + the current labels first: `DELETE` on the labels endpoint clears them all. - Label names are matched case-insensitively and stored with the case given. - Quote label names that contain spaces. - Pass `--yes` to `gh label delete` when running without a prompt, and ask before