[go: up one dir, main page]

Skip to content

Push Option for Merge Request Dependency

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Proposal

Our release pipeline makes use of the Push Options for Merge Requests, but its lacking an Option for setting a Merge Request Dependency

Use case here is that we have an upstream project pipeline (with an MR) triggering a downstream project (creating an MR). As such, the downstream MR should not merge until the upstream merges. If I can pass the MR info from the upstream to the downstream, then I could additionally create the MR dependency with something like:

downstream-job:
  ... 
  script:
    - ...
    - |
      git push --set-upstream origin "$BRANCH_NAME" \
      -o merge_request.create \
      -o merge_request.target=master \
      -o merge_request.remove_source_branch \
      -o merge_request.title="Release Candidate $RELEASE_VERSION" \
      -o merge_request.dependency="$UPSTREAM_PROJECT_PATH/$UPSTREAM_MERGE_REQUEST_ID"

While this is our specific use case, this Push Option is flexible for many cases that involve creating an MR.

Edited by 🤖 GitLab Bot 🤖