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
0
Merge Requests
0
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
iv
gitlab-ce
Commits
c3c97034
Commit
c3c97034
authored
Mar 23, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce
parents
27809a80
88a15b4e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
9 deletions
+13
-9
CHANGELOG
CHANGELOG
+1
-0
app/models/merge_request.rb
app/models/merge_request.rb
+9
-0
app/services/merge_requests/refresh_service.rb
app/services/merge_requests/refresh_service.rb
+3
-9
No files found.
CHANGELOG
View file @
c3c97034
...
@@ -32,6 +32,7 @@ v 7.10.0 (unreleased)
...
@@ -32,6 +32,7 @@ v 7.10.0 (unreleased)
- Add inifinite scroll to user page activity
- Add inifinite scroll to user page activity
- Don't show commit comment button when user is not signed in.
- Don't show commit comment button when user is not signed in.
- Don't include system notes in issue/MR comment count.
- Don't include system notes in issue/MR comment count.
- Don't mark merge request as updated when merge status relative to target branch changes.
v 7.9.0
v 7.9.0
- Send EmailsOnPush email when branch or tag is created or deleted.
- Send EmailsOnPush email when branch or tag is created or deleted.
...
...
app/models/merge_request.rb
View file @
c3c97034
...
@@ -105,6 +105,15 @@ class MergeRequest < ActiveRecord::Base
...
@@ -105,6 +105,15 @@ class MergeRequest < ActiveRecord::Base
state
:unchecked
state
:unchecked
state
:can_be_merged
state
:can_be_merged
state
:cannot_be_merged
state
:cannot_be_merged
around_transition
do
|
merge_request
,
transition
,
block
|
merge_request
.
record_timestamps
=
false
begin
block
.
call
ensure
merge_request
.
record_timestamps
=
true
end
end
end
end
validates
:source_project
,
presence:
true
,
unless: :allow_broken
validates
:source_project
,
presence:
true
,
unless: :allow_broken
...
...
app/services/merge_requests/refresh_service.rb
View file @
c3c97034
...
@@ -53,7 +53,7 @@ module MergeRequests
...
@@ -53,7 +53,7 @@ module MergeRequests
if
merge_request
.
source_branch
==
@branch_name
||
force_push?
if
merge_request
.
source_branch
==
@branch_name
||
force_push?
merge_request
.
reload_code
merge_request
.
reload_code
update_merge_request
(
merge_request
)
merge_request
.
mark_as_unchecked
else
else
mr_commit_ids
=
merge_request
.
commits
.
map
(
&
:id
)
mr_commit_ids
=
merge_request
.
commits
.
map
(
&
:id
)
push_commit_ids
=
@commits
.
map
(
&
:id
)
push_commit_ids
=
@commits
.
map
(
&
:id
)
...
@@ -61,20 +61,14 @@ module MergeRequests
...
@@ -61,20 +61,14 @@ module MergeRequests
if
matches
.
any?
if
matches
.
any?
merge_request
.
reload_code
merge_request
.
reload_code
update_merge_request
(
merge_request
)
merge_request
.
mark_as_unchecked
else
else
update_merge_request
(
merge_request
)
merge_request
.
mark_as_unchecked
end
end
end
end
end
end
end
end
def
update_merge_request
(
merge_request
)
MergeRequests
::
UpdateService
.
new
(
merge_request
.
target_project
,
@current_user
,
merge_status:
'unchecked'
).
execute
(
merge_request
)
end
# Add comment about pushing new commits to merge requests
# Add comment about pushing new commits to merge requests
def
comment_mr_with_commits
def
comment_mr_with_commits
merge_requests
=
@project
.
origin_merge_requests
.
opened
.
where
(
source_branch:
@branch_name
).
to_a
merge_requests
=
@project
.
origin_merge_requests
.
opened
.
where
(
source_branch:
@branch_name
).
to_a
...
...
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