Every time we push to an existing PR, the action gets triggered and a new comment is added to the PR even though the exact same comment was already written in the past.
This change checks for an identical existing comment in the PR before commenting again.
If an identical (same login and message body) comment is found, the action resolves correctly but without re-writing a duplicate comment.
When the comment contains a user notification (@ xxxx), this avoids spamming the user.
The reason why I'm hesitating is that there might be some cases where we actually want to repeat the notification (because the new schema change from the most recent push is actually important for example)
Not 100% sure that we want this but ...
Every time we push to an existing PR, the action gets triggered and a new comment is added to the PR even though the exact same comment was already written in the past.
This change checks for an identical existing comment in the PR before commenting again. If an identical (same login and message body) comment is found, the action resolves correctly but without re-writing a duplicate comment.
When the comment contains a user notification (@ xxxx), this avoids spamming the user.
The reason why I'm hesitating is that there might be some cases where we actually want to repeat the notification (because the new schema change from the most recent push is actually important for example)
Proof that it works: