benchmark-action / benchmark-action/github-action-benchmark

Two comments are created instead of one

Open
#334 0 comments 1 reaction 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.