Skip to content

[FEATURE]: Github action support edit existing comment #30468

@0xLLLLH

Description

@0xLLLLH

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Pain Point

When using the GitHub Action in automated workflows (e.g. reviewing every PR push), a new comment is created on every run. This produces noise on the PR thread.

For example, I'm use workflow config from official doc for reviewing the pull requests in my repo, and when I push new commits, the PR will be reviewed as expected, but new comment be created accordingly, 10 more commits result to 10 more comment. In fact, the review is for the PR branch, outdated comments will be useless since we only need to check latest one.

Proposal

Propose adding a comment_key input: when set, the action finds an existing bot comment with a matching hidden anchor and updates it instead of creating a new one. Falls back to creating a new comment if none is found. The comment_key can be dynamic value like ${{ github.workflow }} so each workflow can maintain a dedicated comment.
With this ability, the PR thread will keep clean and the historic comment content can still be found.
There is an example of the Greptile bot, which edit existing summary comment automatically.
Image

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions