Required : Pipelines should only trigger in creation of merge_requests not on updation of merge_requests

Required : Pipelines should only trigger in creation of merge_requests not on updation of merge_requests. But not happening with below rule

rules:
- if: $CI_PIPELINE_SOURCE == “push”
when: never
- if: $CI_PIPELINE_SOURCE == “merge_request_event”

What else should i add in it ?

Thanks

I have the same issue. I would like to trigger the Pipeline only when creating a Merge Request.
Perhaps, it’s impossible now Merge request pipelines | GitLab

I don’t want to work around with before_script in the job to check and exit 1 because it still created 2 Pipeline while pushing new commit.

workflow:
  rules:
    - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
    - if: '$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS'
      when: never
    - if: '$CI_COMMIT_BRANCH'

It’s possible with the rule above. I worked for me. See more detail at here