Gitlab pipeline status never finish when rules includes changes paths

Hello people,
I am creating a gitlab pipeline when files from specific folders are changing. My rule is

    - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
          - "force-app/main/default/**/*"
      when: always
    - when: never

When i creating a MR with any file that is not included in the path. The pipeline is not finishing and i am not able to merge it.

I’d like to prevent run pipelines when i am commiting any file that are not inside of the directory force-app/main/default/**/*

The configuration Pipelines must succeed is enabled. This configuration is expecting to be enable in case that pipeline fails because teh pipeline is validating code changes


You’re either sharing an incomplete job definition or a job template with rules, which I wouldn’t recommend. IMO stages and rules belong in pipeline templates or directly into pipelines.
Nevertheless the provided information isn’t sufficient to understand when / under which conditions your pipeline would succeed.
My guess is the jobs in your MR pipeline succeed but not on the latest commit on the source branch of the MR.