benchmark-action / benchmark-action/github-action-benchmark
Two comments are created instead of one
- Dominant language
- TypeScript
- Stars
- 1.3k
- Forks
- 184
- PR merge metrics
- No merged PRs in 30d
Description
## Problem
Function [leaveComment](https://github.com/benchmark-action/github-action-benchmark/blob/master/src/write.ts#L242) is called with different commentId, causing 2 comments in PR being created and updated.
Currently, I have 2 PR comments - [one for passed tests](https://github.com/benchmark-action/github-action-benchmark/blob/master/src/write.ts#L269), [another for failed tests (alert triggered)](https://github.com/benchmark-action/github-action-benchmark/blob/master/src/write.ts#L294). I would like to have one PR comment created and updated across all workflow runs within that Pull Request.
## Suggestion
One of these solutions
- allow customising this behaviour with github action option (options like "single_pr_comment" or "custom_comment_id")
- unify `commentId` to be just the value of `benchName` always (when it's alert or not)
If you don't have time to implement this option, are you open to contributions?
Contributor guide
Assessment
This issue has not been assessed yet.