title: How to convert only/except gitlab logic to rules?
body: <p>I currently have the below:</p>
  <pre><code>jobA:
      only:
          refs:
            - merge_requests
            - main
      except:
          refs:
            - pipelines
  </code></pre>
  <p>The <strong>jobA</strong> above is triggered from an upstream pipeline using the <code>trigger:</code> keyword</p>
  <p>How to represent the logic above with rules?</p>
  <p>Is the above logically equivalent to the below?</p>
  <pre><code>rules:
      - if: '$CI_PIPELINE_SOURCE == &quot;pipelines&quot;'
        when: never
      - if: ('$CI_PIPELINE_SOURCE == &quot;merge_request_event&quot;' || $CI_COMMIT_BRANCH == &quot;mainline&quot;')
        when: on_success
  </code></pre>