Is it possible to add comment to pull request from command line

Is it possible to add a comment to a pull request from the command line?

The new GitHub CLI (https://github.com/cli/cli) lets me see the text of the feedback PR; but, I can’t figure out how to read or add comments. Is there another tool (possibly 3rd party) that does have these features?

It looks like this is an open issue on cli/cli:

I looked around for a bit and found “github-commenter” (https://github.com/cloudposse/github-commenter), but it appears to use a service that forwards comments using a bot rather than posting on behalf of your account.

Hey! I’m not aware of any CLIs that can post issue comments, but there is an API to do it: https://developer.github.com/v3/issues/comments/#create-a-comment

If you’re familiar with Bash or a scripting language, you could create a CLI that uses a GitHub Personal Access Token to post an issue comment via the GitHub API :slight_smile:

1 Like
© 2017 GitHub, Inc.
with by
GitHub Education