Commit 872a0e51 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch 'mb-fix-pipeline-flags-serialization' into 'master'

Expose merge request flag as boolean in the pipeline entity

See merge request gitlab-org/gitlab!81431
parents c6cb9896 c27f9a67
...@@ -1166,7 +1166,7 @@ module Ci ...@@ -1166,7 +1166,7 @@ module Ci
def merge_request? def merge_request?
if Feature.enabled?(:ci_pipeline_merge_request_presence_check, default_enabled: :yaml) if Feature.enabled?(:ci_pipeline_merge_request_presence_check, default_enabled: :yaml)
merge_request_id.present? && merge_request merge_request_id.present? && merge_request.present?
else else
merge_request_id.present? merge_request_id.present?
end end
......
...@@ -224,7 +224,8 @@ RSpec.describe Ci::PipelineEntity do ...@@ -224,7 +224,8 @@ RSpec.describe Ci::PipelineEntity do
end end
it 'makes atached flag true' do it 'makes atached flag true' do
expect(subject[:flags][:merge_request_pipeline]).to be_truthy expect(subject[:flags][:merge_request_pipeline]).to be true
expect(subject[:flags][:merge_request]).to be true
end end
it 'exposes source sha and target sha' do it 'exposes source sha and target sha' do
......
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