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
- Verify auth:
gh --version gh auth status - Post a comment:
gh issue comment 123 --body "Status update: fix in progress" gh issue comment 123 --body-file update.md - Edit or delete last comment if requested:
gh issue comment 123 --edit-last --body "Updated info" gh issue comment 123 --delete-last --yes - 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,ghopens an interactive prompt. --webopens the browser for composing a comment.
References
- GitHub CLI manual: https://cli.github.com/manual/
gh issue comment --help