Gh Issue Comment

Add, edit, or delete GitHub issue comments using gh CLI.

dceoy ad1b3d8 1.2 KB Updated

File contents

GitHub Issue Comment

When to use

  • The user asks to comment on an issue or post an update.
  • You need to edit or delete your last comment.

Inputs to confirm

  • Issue number or URL.
  • Comment body (or file path).
  • Whether to edit/delete the last comment.

Workflow

  1. Verify auth:
    gh --version
    gh auth status
    
  2. Post a comment:
    gh issue comment 123 --body "Status update: fix in progress"
    gh issue comment 123 --body-file update.md
    
  3. Edit or delete last comment if requested:
    gh issue comment 123 --edit-last --body "Updated info"
    gh issue comment 123 --delete-last --yes
    
  4. Confirm:
    gh issue view 123 --comments
    

Examples

# Quick update
~ gh issue comment 123 --body "Working on this now."

# Edit last comment
~ gh issue comment 123 --edit-last --body "Revised ETA: tomorrow."

Notes

  • Without --body/--body-file, gh opens an interactive prompt.
  • --web opens the browser for composing a comment.

References

dceoy/github-cli-agent-skills/tree/main/skills/gh-issue-comment commit ad1b3d8a8a

Frequently asked questions

npx skillmds@latest add dceoy/gh-issue-comment