Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
c27f9a67
Commit
c27f9a67
authored
Feb 23, 2022
by
Marius Bobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expose merge request flag as boolean in the pipeline entity
Changelog: fixed
parent
1812f605
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
app/models/ci/pipeline.rb
app/models/ci/pipeline.rb
+1
-1
spec/serializers/ci/pipeline_entity_spec.rb
spec/serializers/ci/pipeline_entity_spec.rb
+2
-1
No files found.
app/models/ci/pipeline.rb
View file @
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
...
...
spec/serializers/ci/pipeline_entity_spec.rb
View file @
c27f9a67
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment