GH-ISSUE-CLOSE(1)

πŸ’… gh-issue-close β€” the "close an issue" era

okay so real talk, this one's from the GitHub CLI manual (that's gh-issue-close(1) if you're being fancy ✨) and it's literally just the glow-up moment where an issue gets to rest. bestie, let's get into it 🫢


✨ NAME ✨

gh-issue-close β€” Close issue πŸ’€βœ¨


🌸 SYNOPSIS 🌸

gh issue close {<number> | <url>} [flags]

so you give it either the issue's number or its url, and then whatever flags your heart desires. very demure, very mindful πŸŽ€


🎯 OPTIONS 🎯

  • -c, --comment <string> β€” Leave a closing comment πŸ’¬ like a little goodbye note on the way out, so nobody's left wondering what happened
  • --duplicate-of <string> β€” Mark as duplicate of another issue by number or URL πŸ‘― "it's giving 'this already exists' energy" β€” you just point at the other one
  • -r, --reason <string> β€” Reason for closing, and the options are {completed|not planned|duplicate} 🏁 pick your character arc

🫢 OPTIONS INHERITED FROM PARENT COMMANDS 🫢

these aren't even her flags, she got them from the parent command, and honestly? nepotism slay πŸ‘‘

  • -R, --repo <[HOST/]OWNER/REPO> β€” Select another repository using the [HOST/]OWNER/REPO format πŸ—‚οΈ so you can close issues in a repo that isn't the one you're standing in

πŸ¦‹ EXIT CODES πŸ¦‹

the vibe check of "did it work" β€” memorize these fr fr:

  • 0: Successful execution βœ… ate, no crumbs
  • 1: Error 😭 something went wrong
  • 2: Command canceled πŸ™ˆ you backed out
  • 4: Authentication required πŸ” ma'am you need to log in first
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information. πŸ‘€ so like, don't come for me if your command's got extra ones β€” check its help

🌈 EXAMPLE 🌈

the moment you've all been waiting for β€” copy these, they're iconic:

# Close issue
$ gh issue close 123

# Close issue and add a closing comment
$ gh issue close 123 --comment "Closing this issue"

# Close issue as a duplicate of issue #456
$ gh issue close 123 --duplicate-of 456

# Close issue as not planned
$ gh issue close 123 --reason "not planned"

not the "not planned" reason being the most passive-aggressive closure in existence πŸ’€ anyway, it's giving closure (literally) 😌


πŸ‘‘ SEE ALSO πŸ‘‘

  • gh-issue(1) β€” the whole issue family, go meet the relatives 🧚

that's the whole page bestie, no cap πŸ“ β€” brought to you by GitHub CLI v2.102.0, dated Oct 2026, and yes the footer ships with the same energy: GH-ISSUE-CLOSE(1) top and bottom, periodt πŸ’œ

πŸ“¦ where this page comes from