1
0
-1
1 answer
- 10-1
This block should make it:
def publicComments = issue.comments.findAll{!it.internal} def isMentionedInPublicComments(attachment, publicComments) { publicComments.any {c -> c.body.contains("[^" + attachment.filename + "]") || (c.body =~ (/!${java.util.regex.Pattern.quote(attachment.filename)}(\|.*!|!)/.toString())).find() } } replica.attachments = issue.attachments.filter{isMentionedInPublicComments(it, publicComments)}
Add your comment...
I want to only sync attachments that are references from public comments