ghi icon indicating copy to clipboard operation
ghi copied to clipboard

`ghi comment -amend` doesn't work

Open alphaCTzo7G opened this issue 7 years ago • 2 comments

Hi all

Thanks for creating this project.

I recently found that even though there is an option to do a ghi comment --amend it doesn't work.

The way I am doing this is

  1. I have a existing issues say issue #49
  2. while in the git repository, I issue the command ghi comment --amend 49.

However, this gives me the error message

No recent comment found..

However, this is not true, because my git repo does have a lot of comments.

Am I using a wrong command line option or is this by design?

alphaCTzo7G avatar Jul 15 '18 20:07 alphaCTzo7G

Test message, edited.

MahShaaban avatar Nov 05 '18 03:11 MahShaaban

Hi @alphaCTzo7G.

I think the proper way to use the option --amend with ghi comment command is to place the text right after the option and before the issue number.

usage: ghi comment [options] <issueno>

I created and edited the previous comment using this

$ ghi comment -m "Test message" 366
$ ghi comment --amend "Test message, edited." 366

This works for the "comments", but you might need to use ghi edit to modify the issues themselves.

MahShaaban avatar Nov 05 '18 03:11 MahShaaban