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
90c793bd
Commit
90c793bd
authored
Mar 10, 2020
by
Alessio Caiazza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove track_mr_picking feature flag
Merge requests cherry-pick tracking is now a proper feature
parent
7b0b5919
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
65 deletions
+0
-65
app/services/commits/cherry_pick_service.rb
app/services/commits/cherry_pick_service.rb
+0
-2
app/services/deployments/link_merge_requests_service.rb
app/services/deployments/link_merge_requests_service.rb
+0
-4
spec/services/commits/cherry_pick_service_spec.rb
spec/services/commits/cherry_pick_service_spec.rb
+0
-12
spec/services/deployments/link_merge_requests_service_spec.rb
.../services/deployments/link_merge_requests_service_spec.rb
+0
-47
No files found.
app/services/commits/cherry_pick_service.rb
View file @
90c793bd
...
...
@@ -11,8 +11,6 @@ module Commits
private
def
track_mr_picking
(
pick_sha
)
return
unless
Feature
.
enabled?
(
:track_mr_picking
,
project
)
merge_request
=
project
.
merge_requests
.
by_merge_commit_sha
(
@commit
.
sha
).
first
return
unless
merge_request
...
...
app/services/deployments/link_merge_requests_service.rb
View file @
90c793bd
...
...
@@ -38,8 +38,6 @@ module Deployments
.
commits_between
(
from
,
to
)
.
map
(
&
:id
)
track_mr_picking
=
Feature
.
enabled?
(
:track_mr_picking
,
project
)
# For some projects the list of commits to deploy may be very large. To
# ensure we do not end up running SQL queries with thousands of WHERE IN
# values, we run one query per a certain number of commits.
...
...
@@ -53,8 +51,6 @@ module Deployments
deployment
.
link_merge_requests
(
merge_requests
)
next
unless
track_mr_picking
picked_merge_requests
=
project
.
merge_requests
.
by_cherry_pick_sha
(
slice
)
...
...
spec/services/commits/cherry_pick_service_spec.rb
View file @
90c793bd
...
...
@@ -61,18 +61,6 @@ describe Commits::CherryPickService do
expect
(
mr_notes
.
length
).
to
eq
(
1
)
expect
(
mr_notes
[
0
].
commit_id
).
to
eq
(
result
[
:result
])
end
context
'when :track_mr_picking feature flag is disabled'
do
before
do
stub_feature_flags
(
track_mr_picking:
false
)
end
it
'does not add system notes'
do
expect
do
cherry_pick
(
merge_commit_sha
,
branch_name
)
end
.
not_to
change
{
Note
.
count
}
end
end
end
def
find_cherry_pick_notes
(
noteable
)
...
...
spec/services/deployments/link_merge_requests_service_spec.rb
View file @
90c793bd
...
...
@@ -160,53 +160,6 @@ describe Deployments::LinkMergeRequestsService do
expect
(
deploy
.
merge_requests
).
to
be_empty
end
context
'when :track_mr_picking feature flag is disabled'
do
before
do
stub_feature_flags
(
track_mr_picking:
false
)
end
it
'does not link picked merge requests'
do
environment
=
create
(
:environment
,
project:
project
)
deploy
=
create
(
:deployment
,
:success
,
project:
project
,
environment:
environment
)
picked_mr
=
create
(
:merge_request
,
:merged
,
merge_commit_sha:
'123abc'
,
source_project:
project
,
target_project:
project
)
mr1
=
create
(
:merge_request
,
:merged
,
merge_commit_sha:
mr1_merge_commit_sha
,
source_project:
project
,
target_project:
project
)
# mr1 includes c1c67abba which is a cherry-pick of the fake picked_mr merge request
create
(
:track_mr_picking_note
,
noteable:
picked_mr
,
project:
project
,
commit_id:
'c1c67abbaf91f624347bb3ae96eabe3a1b742478'
)
mr2
=
create
(
:merge_request
,
:merged
,
merge_commit_sha:
mr2_merge_commit_sha
,
source_project:
project
,
target_project:
project
)
described_class
.
new
(
deploy
).
link_merge_requests_for_range
(
first_deployment_sha
,
mr2_merge_commit_sha
)
expect
(
deploy
.
merge_requests
).
to
include
(
mr1
,
mr2
)
expect
(
deploy
.
merge_requests
).
not_to
include
(
picked_mr
)
end
end
end
describe
'#link_all_merged_merge_requests'
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