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
51fbdb3b
Commit
51fbdb3b
authored
Jun 10, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
0de92c60
d5e8e1ef
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
52 additions
and
12 deletions
+52
-12
app/assets/stylesheets/framework/issue_box.scss
app/assets/stylesheets/framework/issue_box.scss
+2
-2
app/assets/stylesheets/pages/issuable.scss
app/assets/stylesheets/pages/issuable.scss
+1
-2
app/models/project_statistics.rb
app/models/project_statistics.rb
+1
-1
app/services/merge_requests/base_service.rb
app/services/merge_requests/base_service.rb
+4
-0
app/services/merge_requests/close_service.rb
app/services/merge_requests/close_service.rb
+0
-4
app/services/merge_requests/refresh_service.rb
app/services/merge_requests/refresh_service.rb
+3
-3
app/services/merge_requests/update_service.rb
app/services/merge_requests/update_service.rb
+2
-0
changelogs/unreleased/ac-63020-typeerror-nil-can-t-be-coerced-into-integer.yml
.../ac-63020-typeerror-nil-can-t-be-coerced-into-integer.yml
+5
-0
changelogs/unreleased/cancel-auto-merge-when-branch-is-changed.yml
...s/unreleased/cancel-auto-merge-when-branch-is-changed.yml
+5
-0
changelogs/unreleased/fix-issue-mr-badge.yml
changelogs/unreleased/fix-issue-mr-badge.yml
+5
-0
spec/models/project_statistics_spec.rb
spec/models/project_statistics_spec.rb
+12
-0
spec/services/merge_requests/update_service_spec.rb
spec/services/merge_requests/update_service_spec.rb
+12
-0
No files found.
app/assets/stylesheets/framework/issue_box.scss
View file @
51fbdb3b
...
...
@@ -16,10 +16,10 @@
margin-top
:
5px
;
}
border-radius
:
3px
;
border-radius
:
$border-radius-default
;
display
:
block
;
float
:
left
;
margin-right
:
10px
;
margin-right
:
$gl-padding-8
;
color
:
$white-light
;
font-size
:
$gl-font-size
;
line-height
:
$gl-line-height-24
;
...
...
app/assets/stylesheets/pages/issuable.scss
View file @
51fbdb3b
...
...
@@ -682,8 +682,7 @@
justify-content
:
center
;
align-items
:
center
;
margin-top
:
0
;
padding-left
:
9px
;
padding-right
:
9px
;
padding
:
0
$gl-padding-8
;
@include
media-breakpoint-up
(
sm
)
{
display
:
inline-block
;
...
...
app/models/project_statistics.rb
View file @
51fbdb3b
...
...
@@ -54,7 +54,7 @@ class ProjectStatistics < ApplicationRecord
end
def
update_storage_size
self
.
storage_size
=
repository_size
+
wiki_size
+
lfs_objects_size
+
build_artifacts_size
+
packages_size
self
.
storage_size
=
repository_size
+
wiki_size
.
to_i
+
lfs_objects_size
+
build_artifacts_size
+
packages_size
end
# Since this incremental update method does not call update_storage_size above,
...
...
app/services/merge_requests/base_service.rb
View file @
51fbdb3b
...
...
@@ -68,6 +68,10 @@ module MergeRequests
!
merge_request
.
for_fork?
end
def
cancel_auto_merge
(
merge_request
)
AutoMergeService
.
new
(
project
,
current_user
).
cancel
(
merge_request
)
end
# Returns all origin and fork merge requests from `@project` satisfying passed arguments.
# rubocop: disable CodeReuse/ActiveRecord
def
merge_requests_for
(
source_branch
,
mr_states:
[
:opened
])
...
...
app/services/merge_requests/close_service.rb
View file @
51fbdb3b
...
...
@@ -34,9 +34,5 @@ module MergeRequests
merge_request_metrics_service
(
merge_request
).
close
(
close_event
)
end
end
def
cancel_auto_merge
(
merge_request
)
AutoMergeService
.
new
(
project
,
current_user
).
cancel
(
merge_request
)
end
end
end
app/services/merge_requests/refresh_service.rb
View file @
51fbdb3b
...
...
@@ -24,7 +24,7 @@ module MergeRequests
reload_merge_requests
outdate_suggestions
refresh_pipelines_on_merge_requests
cancel_auto_merge
cancel_auto_merge
s
mark_pending_todos_done
cache_merge_requests_closing_issues
...
...
@@ -142,9 +142,9 @@ module MergeRequests
end
end
def
cancel_auto_merge
def
cancel_auto_merge
s
merge_requests_for_source_branch
.
each
do
|
merge_request
|
AutoMergeService
.
new
(
project
,
current_user
).
cancel
(
merge_request
)
cancel_auto_merge
(
merge_request
)
end
end
...
...
app/services/merge_requests/update_service.rb
View file @
51fbdb3b
...
...
@@ -43,6 +43,8 @@ module MergeRequests
create_branch_change_note
(
merge_request
,
'target'
,
merge_request
.
previous_changes
[
'target_branch'
].
first
,
merge_request
.
target_branch
)
cancel_auto_merge
(
merge_request
)
end
if
merge_request
.
assignees
!=
old_assignees
...
...
changelogs/unreleased/ac-63020-typeerror-nil-can-t-be-coerced-into-integer.yml
0 → 100644
View file @
51fbdb3b
---
title
:
Fix nil coercion updating storage size on project statistics
merge_request
:
29425
author
:
type
:
fixed
changelogs/unreleased/cancel-auto-merge-when-branch-is-changed.yml
0 → 100644
View file @
51fbdb3b
---
title
:
Cancel Auto Merge when target branch is changed
merge_request
:
29416
author
:
type
:
fixed
changelogs/unreleased/fix-issue-mr-badge.yml
0 → 100644
View file @
51fbdb3b
---
title
:
Use grid and correct border radius for status badge
merge_request
:
author
:
type
:
other
spec/models/project_statistics_spec.rb
View file @
51fbdb3b
...
...
@@ -197,6 +197,18 @@ describe ProjectStatistics do
expect
(
statistics
.
storage_size
).
to
eq
9
end
it
'works during wiki_size backfill'
do
statistics
.
update!
(
repository_size:
2
,
wiki_size:
nil
,
lfs_objects_size:
3
)
statistics
.
reload
expect
(
statistics
.
storage_size
).
to
eq
5
end
end
describe
'.increment_statistic'
do
...
...
spec/services/merge_requests/update_service_spec.rb
View file @
51fbdb3b
...
...
@@ -406,6 +406,18 @@ describe MergeRequests::UpdateService, :mailer do
expect
(
pending_todo
.
reload
).
to
be_done
end
end
context
'when auto merge is enabled and target branch changed'
do
before
do
AutoMergeService
.
new
(
project
,
user
).
execute
(
merge_request
,
AutoMergeService
::
STRATEGY_MERGE_WHEN_PIPELINE_SUCCEEDS
)
update_merge_request
({
target_branch:
'target'
})
end
it
'marks pending todos as done'
do
expect
(
pending_todo
.
reload
).
to
be_done
end
end
end
context
'when the merge request is relabeled'
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