oke-py / npm-audit-action

GitHub Action to run `npm audit`
MIT License
42 stars 26 forks source link

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

Open humble-barnacle001 opened 2 years ago

humble-barnacle001 commented 2 years ago

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

oke-py commented 2 years ago

Thanks for your feedback. I agree.

humble-barnacle001 commented 2 years ago

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 commented 2 years ago

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