gh api -X POST repos/owner/repo/issues/5/comments -f body='Fixed in #10'

Category: GitHub CLI

gh api -X POST repos/owner/repo/issues/5/comments -f body='Fixed in #10'

Comment on an issue via the REST API

POSTs a comment to issue 5 with the body field, the API form of gh issue comment. Use this when automation, not a human, must post context like CI results. The comment appears in the issue thread like any other.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.