GitLab steht aufgrund wichtiger Wartungsarbeiten am Montag, den 8. März, zwischen 17:00 und 19:00 Uhr nicht zur Verfügung.

Commit fc9f8e59 authored by Rémy Coutable's avatar Rémy Coutable Committed by Alejandro Rodríguez

Merge branch 'hot-fix-define-pipeline-vars' into 'master'

Do not use MergeRequest#commits in define_pipelines_vars

## What does this MR do?

`MergeRequest#commits` requires merge_request_diff to be present.
This is not the case when creating a new merge request.

## What are the relevant issue numbers?

Fix up for


See merge request !7664
parent cf7239ab
......@@ -563,11 +563,8 @@ def define_diff_comment_vars
def define_pipelines_vars
@pipelines = @merge_request.all_pipelines
if @pipelines.present? && @merge_request.commits.present?
@pipeline = @pipelines.first
@statuses = @pipeline.statuses.relevant
@pipeline = @merge_request.pipeline
@statuses = @pipeline.statuses.relevant if @pipeline.present?
def define_new_vars
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment