I am trying to configure Jenkins integration in GitLab, as it is recommended in favor of webhooks.
On the input form ([Gitlab project url]/-/integrations/jenkins/edit), I can check: Merge request, which has this note:
Trigger event when a merge request is created, updated, or merged.
I would like to distinguish between merge requests being created or updated on one hand and being merged on the other hand. Only when they are being merged, I want Jenkins to perform a deployment.
Can I detect in Jenkins what type of merge request event triggered the pipeline?