Skip to content

Skip posting duplicate release comments#582

Open
rcdailey wants to merge 1 commit intoapexskier:mainfrom
rcdailey:skip-duplicate-comments
Open

Skip posting duplicate release comments#582
rcdailey wants to merge 1 commit intoapexskier:mainfrom
rcdailey:skip-duplicate-comments

Conversation

@rcdailey
Copy link

Summary

  • Before posting a release comment on an issue or PR, the action now checks whether a comment with the same body already exists from the authenticated user and skips posting if so
  • This makes the action idempotent, preventing duplicate comments when a workflow is re-run or triggered multiple times for the same release
  • The duplicate check is scoped to the token's identity so it doesn't interfere with comments left by other users or bots

Fixes #578

Before creating a comment, fetch existing comments on the issue/PR
and compare body text and author login against the authenticated
user. If a match is found, the comment is skipped and a log message
is emitted instead.

This prevents duplicate comments when a workflow run is retried.

Closes apexskier#578
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Skip if comment exists

1 participant