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 theprojectscope. to get that, rungh 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
β 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/REPOformat. 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
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms