tfnotify
tfnotify copied to clipboard
New comment every time or updates to existing 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?
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