Gitlab-ci.yml STOP the job being executed when MR created

Hello,

Im looking for a solution on how to STOP the job to run when Merge Request has been created.

my code:

  rules:
    - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
      when: never
    - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
      changes: 
        paths:
          - $TRACK_DIR/*/*
      when: always 

the variable you are looking for is CI_OPEN_MERGE_REQUESTS, if it has value branch is used as source in MR