From d43202f45f692f5de23ecf4266885da7d2d870ef Mon Sep 17 00:00:00 2001
From: Manuel Grabowski <mgrabowski@gitlab.com>
Date: Tue, 4 Jul 2023 03:41:26 +0000
Subject: [PATCH] Fix upstream MR pipeline in artifact-fetch example

---
 doc/ci/pipelines/downstream_pipelines.md | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/doc/ci/pipelines/downstream_pipelines.md b/doc/ci/pipelines/downstream_pipelines.md
index fdc03daf7ad4c..686020fc17af3 100644
--- a/doc/ci/pipelines/downstream_pipelines.md
+++ b/doc/ci/pipelines/downstream_pipelines.md
@@ -449,6 +449,8 @@ pass `CI_MERGE_REQUEST_REF_PATH` to the downstream pipeline using [variable inhe
 
    ```yaml
    build_artifacts:
+     rules:
+       - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
      stage: build
      script:
        - echo "This is a test artifact!" >> artifact.txt
@@ -457,6 +459,8 @@ pass `CI_MERGE_REQUEST_REF_PATH` to the downstream pipeline using [variable inhe
          - artifact.txt
 
    upstream_job:
+     rules:
+       - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
      variables:
        UPSTREAM_REF: $CI_MERGE_REQUEST_REF_PATH
      trigger:
-- 
GitLab