Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New comment every time or updates to existing comments? #85

Open
jamesh37 opened this issue Nov 26, 2020 · 1 comment
Open

New comment every time or updates to existing comments? #85

jamesh37 opened this issue Nov 26, 2020 · 1 comment

Comments

@jamesh37
Copy link

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?

@quulah
Copy link

quulah commented Mar 1, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants