tfnotify icon indicating copy to clipboard operation
tfnotify copied to clipboard

New comment every time or updates to existing comments?

Open jamesh37 opened this issue 4 years ago • 1 comments

I am running 3 TF plans in a given PR workflow, and tfnotify is correctly giving me a new comment for each plan. However I get a set of 3 new comments every time the workflow runs. Is this expected behaviour or should it update/replace the comments on each run?

jamesh37 avatar Nov 26 '20 09:11 jamesh37

Currently using tfcmt which does create a new comment for each workflow, but was thinking of changing to tfnotify (for other reasons). In any case, I would like to have this supported as well.

The GitHub API has an option to either update or create a new comment.

For the update, you may need to ear mark each comment so you can track them in some way. Find the correct comment ID and then update the relevant one.

I've personally used some "comment created by something" text in the comments, and then list all the comments, find the text, and grab the ID of that.

https://docs.github.com/en/rest/reference/issues#list-issue-comments https://docs.github.com/en/rest/reference/issues#update-an-issue-comment

quulah avatar Mar 01 '22 14:03 quulah