GH-ISSUE-EDIT(1)

πŸ’… GH-ISSUE-EDIT(1) β€” the GitHub CLI manual, bestie edition

okay so this is the manual page for gh-issue-edit, part of the GitHub CLI manual. yes we're doing this. sit down, grab a strawberry πŸ“, and let's fix your issues.


✨ SYNOPSIS ✨

gh issue edit {<numbers> | <urls>} [flags]

that's it. that's the whole vibe. you give it issue numbers or URLs and then you tell it what to change. πŸŽ€


🌸 DESCRIPTION 🌸

Edit one or more issues inside the same repository. one repo, many issues, no chaos (mostly). πŸ’–

🚨 real talk: editing issues' projects needs authorization with the project scope. to get that, run gh auth refresh -s project. don't skip this, it will not work and you will be sad.

πŸ–ΌοΈ the --attach situation (lowkey iconic)

Use --attach to upload an image or video to a single issue. here's the tea:

  • if you don't pass a body flag, the issue keeps the body it already has, and the attachment gets appended to it. no erasing, we're being polite.
  • if the body references an attached file β€” like ![alt](./login.png) β€” that reference gets rewritten to point at the uploaded asset instead. slay.
  • you can attach up to 50 files per command. fifty. that's the ceiling. 🫢

πŸ“ alt text, explained

alt text for an image follows the path after #, like this:

--attach './login.png#The login error state'

Without it, the filename is used. and if a reference is already in the body, it keeps the alt text written there β€” we don't overwrite your words, bestie. πŸ’œ

Video renders as a player and has no alt text, so it cannot be given any. that's just how it is. πŸ’€

😭 the partial-failure scenario

If some attachments upload and others fail, the issue is still updated with the ones that succeeded. the command then exits with a non-zero status, but the edited issue URLs are still printed to stdout. so like, it half-ate, but it ate. πŸ”₯

πŸ‘― special assignee values

The --add-assignee and --remove-assignee flags both support these special values:

  • @me β€” assign or unassign yourself
  • @copilot β€” assign or unassign Copilot (not supported on GitHub Enterprise Server, sorry babes)

πŸŽ€ OPTIONS πŸŽ€

  • --add-assignee <login> β€” add assigned users by their login. use "@me" to assign yourself, or "@copilot" to assign Copilot.
  • --add-blocked-by <number> β€” add 'blocked by' relationships by issue number or URL.
  • --add-blocking <number> β€” add 'blocking' relationships by issue number or URL.
  • --add-label <name> β€” add labels by name.
  • --add-project <title> β€” add the issue to projects by title.
  • --add-sub-issue <number> β€” add sub-issues by number or URL.
  • --attach <file> β€” attach an image or video file, in '#' format.
  • -b, --body <string> β€” set the new body.
  • -F, --body-file <file> β€” read body text from file (use "-" to read from standard input).
  • -m, --milestone <name> β€” edit the milestone the issue belongs to, by name.
  • --parent <number> β€” set the parent issue by number or URL.
  • --remove-assignee <login> β€” remove assigned users by their login. use "@me" to unassign yourself, or "@copilot" to unassign Copilot.
  • --remove-blocked-by <number> β€” remove 'blocked by' relationships by issue number or URL.
  • --remove-blocking <number> β€” remove 'blocking' relationships by issue number or URL.
  • --remove-label <name> β€” remove labels by name.
  • --remove-milestone β€” remove the milestone association from the issue.
  • --remove-parent β€” remove the parent issue.
  • --remove-project <title> β€” remove the issue from projects by title.
  • --remove-sub-issue <number> β€” remove sub-issues by number or URL.
  • --remove-type β€” remove the issue type from the issue.
  • -t, --title <string> β€” set the new title.
  • --type <name> β€” set the issue type by name.

πŸ¦‹ OPTIONS INHERITED FROM PARENT COMMANDS πŸ¦‹

  • -R, --repo <[HOST/]OWNER/REPO> β€” select another repository using the [HOST/]OWNER/REPO format. main character energy: you get to pick where you are. πŸ‘‘

🌈 EXIT CODES 🌈

  • 0 β€” successful execution πŸŽ‰
  • 1 β€” error 😭
  • 2 β€” command canceled πŸ™ˆ
  • 4 β€” authentication required πŸ”
⭐ NOTE: specific commands may have additional exit codes. refer to the command's help for more information. iykyk.

🧚 EXAMPLE 🧚

like, actual receipts. copy these, they're exact:

$ gh issue edit 23 --title "I found a bug" --body "Nothing works"
$ gh issue edit 23 --add-label "bug,help wanted" --remove-label "core"
$ gh issue edit 23 --add-assignee "@me" --remove-assignee monalisa,hubot
$ gh issue edit 23 --add-assignee "@copilot"
$ gh issue edit 23 --add-project "Roadmap" --remove-project v1,v2
$ gh issue edit 23 --milestone "Version 1"
$ gh issue edit 23 --remove-milestone
$ gh issue edit 23 --body-file body.txt
$ gh issue edit 23 --attach './login.png#The login error state'
$ gh issue edit 23 --attach ./before.png --attach ./after.png
$ gh issue edit 23 34 --add-label "help wanted"
$ gh issue edit 23 --type Bug
$ gh issue edit 23 --remove-type
$ gh issue edit 23 --parent 100
$ gh issue edit 23 --remove-parent
$ gh issue edit 100 --add-sub-issue 123,124
$ gh issue edit 123 --add-blocked-by 200 --add-blocking 300,301

notice that last one edits 123 and adds relationships to 200, 300, and 301? multi-issue behaviour at its finest. πŸ’…


πŸ‘€ SEE ALSO πŸ‘€

  • gh-issue(1) β€” go read the main one, bestie, it's the parent.

and that's the whole page!! 🫢 this was GitHub CLI v2.102.0, dated Oct 2026 β€” consider yourself signed off, mwah πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from