npm-audit-action icon indicating copy to clipboard operation
npm-audit-action copied to clipboard

The option dedupe_issues should edit the previous issue comment instead of creating a new comment

Open humble-barnacle001 opened this issue 3 years ago • 3 comments

What would you like to be added: The option dedupe_issues should edit the comment if it already exists and not create a new comment on the same issue

Why is this needed: If used in workflows running on schedule it can create multiple comments for same vulnerabilities report which might be a problem

humble-barnacle001 avatar Jan 23 '22 06:01 humble-barnacle001

Thanks for your feedback. I agree.

oke-py avatar Jan 23 '22 13:01 oke-py

https://octokit.github.io/rest.js/v18#issues-update-comment with comment ID from https://octokit.github.io/rest.js/v18#issues-list-comments might help instead of the current https://github.com/oke-py/npm-audit-action/blob/main/src/main.ts#L97

humble-barnacle001 avatar Jan 25 '22 16:01 humble-barnacle001

If we can use an action inside an action or get inspired by it, something similar to https://github.com/peter-evans/create-or-update-comment

humble-barnacle001 avatar Jan 26 '22 20:01 humble-barnacle001