Skip to content
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

Avoid posting comment multiple times in same PR #9

Merged
merged 1 commit into from
Feb 12, 2024

Conversation

florisvdg
Copy link
Member

The fact that the PR comment gets posted on every push if there's 1 (older) commit in the PR that's unsigned can result in noisy PRs.

So instead of posting the PR comment over and over, we'll now check the PR comments and only post the comment if it hasn't been posted earlier. This won't impact the exit code that gets returned.

Resolves #8

Logs of test runs can be found here: unsigned commit that results in comment and second unsigned commit that skips the comment.

@kdheepak
Copy link

Can I check on the status of this PR? Friendly bump!

@edif2008
Copy link
Member

Thank you for improving the experience. This looks great to me. I do appreciate you providing logs for tests runs showing how this adjustment positively impacts the action.

I have one question (non-blocking). From my understanding, the comment message isn't updated if it already exists. However, how can a user who adds more commits to a PR know that the specific comment is still up-to-date and relevant? Having the pipeline fail is one way to achieve it, but is this enough? 🤔

Approved. ✅ 💪🏻

@florisvdg
Copy link
Member Author

However, how can a user who adds more commits to a PR know that the specific comment is still up-to-date and relevant? Having the pipeline fail is one way to achieve it, but is this enough?

That's a bit of a trade-off, indeed. But the first comment is already so in your face that I think having the check fail will later on will be enough.

@florisvdg florisvdg merged commit 04f4a87 into main Feb 12, 2024
1 check passed
@florisvdg florisvdg deleted the no-duplicate-comment branch February 12, 2024 14:38
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.

Overwrite existing comment instead of a new comment for each new commit
3 participants