-
Notifications
You must be signed in to change notification settings - Fork 80
chore: prevent duplicate preview release comments #119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Only create a PR comment if one doesn't already exist. This prevents spam when the workflow runs multiple times.
✅ Preview binaries are ready! To test with modules: |
✅ Preview binaries are ready! To test with modules: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matifali rather than checking all the comments, a better approach would be to get a variable from the previous step like this depending on the if condition, and then use it in the next step
echo "comment=true/false" >> "${GITHUB_OUTPUT}"
Add should_comment flag that's set based on whether a release is created (not updated). Only comment when creating new releases.
✅ Preview binaries are ready! To test with modules: |
✅ Preview binaries are ready! To test with modules: |
@35C4n0r as the workflow gets triggered by another workflow its not possible to test it in this PR. PRs can only run an updated workflow file if the trigger is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Summary
Test plan