Closed Jorundur closed 2 years ago
+1 this has broken my action, I only have check_duplicate_msg: true
and no other arg except the message and it is now making duplicates
This bug seems to have been introduced here: https://github.com/unsplash/comment-on-pr/pull/44
@BradStapleton FYI:
Until this is fixed, I've temporarily added the duplicate_msg_pattern
argument like so:
with:
msg: Message text example [link](https://some.link/something-${{ github.event.number }})
duplicate_msg_pattern: Message text example*
This prevents duplicate comments.
Fixed in #50. Available in v1.3.1
.
The script should exit (and therefore not add a new comment) if there's a duplicate comment already.
This is done via the
check_duplicate_msg
arg which istrue
by default. I.e. if this istrue
and a duplicate is found, then the script exits.However, we only check this inside the condition
if !duplicate_msg_pattern.empty? || !delete_prev_regex_msg.empty?
, i.e. either one of those arguments has to exist for the script to exit if there's a duplicate. (https://github.com/unsplash/comment-on-pr/blob/master/entrypoint.sh#L43)Can this be changed so that it checks for duplicates regardless of the
duplicate_msg_pattern
anddelete_prev_regex_msg
arguments?See my closed issue https://github.com/unsplash/comment-on-pr/issues/46 for more context for how I got here.