Only: merge_requests does not trigger job

Hello,

I have the following .gitlab-ci.yml file (including only build stage job as the rest is irrelevant) where I want the build job be triggered only in case of merge requests:

stages:
 - build
 - deployToDev
 - deployToQa
 - deployToProd

variables:
 O_CHANGES: git diff --name-only $CI_COMMIT_BEFORE_SHA $CI_COMMIT_SHA


build:
 stage: build
 before_script:
  - $changedFilesList=(invoke-expression $O_CHANGES)
 script:
  - write-host $changedFilesList
  - C:\Users\alper\gitlab-runner\buildScript.ps1 $changedFilesList
 except:
  changes:
   - .gitignore
   - .gitlab-ci.yml
 only:
  - merge_requests

The job does not trigger when I create a merge request neither does it trigger when I accept the merge request. When I change merge_requests to master or branches, it works fine. What am I doing wrong?

Very similar issue occures to me.
I wanted to run a job for merge requests only IF a given file (changelog) haven’t changed

like

jobname:
  only:
    refs:
      - merge_requests
  except:
    changes:
      - changelog.txt

job never created.
both conditions work in itself.