Hub: comment on issue

Created on 18 Sep 2014  Â·  5Comments  Â·  Source: github/hub

We have a few scripts that automate a lot of our workflow, and currently it uses hub a bit. One thing I want to be able to do is automatically add a comment to an issue like “This issue is being worked starting from sellout/slamdata@123764327412736.” when the first push to the branch named “wip/264-some-issue” happens.

feature

Most helpful comment

After some consideration, I have decided that—for now—this is best implemented in user scripts, rather than maintained in hub core. Now that there is a new hub api command, I will close this feature request and leave implementing this as an exercise to the reader. https://github.com/github/hub/releases/tag/v2.8.3 https://github.com/github/hub/pull/2016

For example:

hub api repos/{owner}/{repo}/issues/1234/comments -f body='This is my comment!'

Thank you for suggesting!

All 5 comments

In the future the Go implementation of hub might allow issue management as
well as adding of comments.

Is there any idea how would you like such a command to look like?

I hadn’t really thought about how it would look, but maybe something like this: hub comment SHA/ISSUE-REF [-o|--browse] [-m MESSAGE|-F FILE]

So, any SHA or issue ref that would work in Markdown would work as a comment destination. The other options are the same as pull-request (including falling back to $EDITOR).

This is something that https://github.com/stephencelis/ghi does quite well, at the moment. Just a suggestion.

@RichardLitt Ah, excellent. I’ll give that a go. Thanks!

After some consideration, I have decided that—for now—this is best implemented in user scripts, rather than maintained in hub core. Now that there is a new hub api command, I will close this feature request and leave implementing this as an exercise to the reader. https://github.com/github/hub/releases/tag/v2.8.3 https://github.com/github/hub/pull/2016

For example:

hub api repos/{owner}/{repo}/issues/1234/comments -f body='This is my comment!'

Thank you for suggesting!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Kristinita picture Kristinita  Â·  4Comments

wwwdata picture wwwdata  Â·  3Comments

iserko picture iserko  Â·  4Comments

kentcdodds picture kentcdodds  Â·  4Comments

dsifford picture dsifford  Â·  4Comments