Answer by Juan Grases on 27 March 2020
Hi! In Jira Server 4.7.4 you can now know the Jira Event which push this sync and play with it:
// works from 4.7.4
//Place this line on top of your outgoing sync to ensure that only comment created events would trigger sync
if(firstSync && (!eventTypeId || eventTypeId != com.atlassian.jira.event.type.EventType.ISSUE_COMMENTED_ID)) return;