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
Boxiang Sun
gitlab-ce
Commits
80daf9a7
Commit
80daf9a7
authored
Mar 25, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use current_user for Notification#merge_mr
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
8bbac457
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
app/services/merge_requests/auto_merge_service.rb
app/services/merge_requests/auto_merge_service.rb
+1
-1
app/services/merge_requests/merge_service.rb
app/services/merge_requests/merge_service.rb
+1
-1
app/services/notification_service.rb
app/services/notification_service.rb
+2
-2
No files found.
app/services/merge_requests/auto_merge_service.rb
View file @
80daf9a7
...
@@ -12,7 +12,7 @@ module MergeRequests
...
@@ -12,7 +12,7 @@ module MergeRequests
merge_request
.
author_id_of_changes
=
current_user
.
id
merge_request
.
author_id_of_changes
=
current_user
.
id
merge_request
.
merge
merge_request
.
merge
notification
.
merge_mr
(
merge_request
)
notification
.
merge_mr
(
merge_request
,
current_user
)
create_merge_event
(
merge_request
)
create_merge_event
(
merge_request
)
execute_project_hooks
(
merge_request
)
execute_project_hooks
(
merge_request
)
...
...
app/services/merge_requests/merge_service.rb
View file @
80daf9a7
...
@@ -10,7 +10,7 @@ module MergeRequests
...
@@ -10,7 +10,7 @@ module MergeRequests
merge_request
.
author_id_of_changes
=
current_user
.
id
merge_request
.
author_id_of_changes
=
current_user
.
id
merge_request
.
merge
merge_request
.
merge
notification
.
merge_mr
(
merge_request
)
notification
.
merge_mr
(
merge_request
,
current_user
)
create_merge_event
(
merge_request
)
create_merge_event
(
merge_request
)
execute_project_hooks
(
merge_request
)
execute_project_hooks
(
merge_request
)
...
...
app/services/notification_service.rb
View file @
80daf9a7
...
@@ -86,12 +86,12 @@ class NotificationService
...
@@ -86,12 +86,12 @@ class NotificationService
# * merge_request assignee if their notification level is not Disabled
# * merge_request assignee if their notification level is not Disabled
# * project team members with notification level higher then Participating
# * project team members with notification level higher then Participating
#
#
def
merge_mr
(
merge_request
)
def
merge_mr
(
merge_request
,
current_user
)
recipients
=
reject_muted_users
([
merge_request
.
author
,
merge_request
.
assignee
],
merge_request
.
target_project
)
recipients
=
reject_muted_users
([
merge_request
.
author
,
merge_request
.
assignee
],
merge_request
.
target_project
)
recipients
=
recipients
.
concat
(
project_watchers
(
merge_request
.
target_project
)).
uniq
recipients
=
recipients
.
concat
(
project_watchers
(
merge_request
.
target_project
)).
uniq
recipients
.
each
do
|
recipient
|
recipients
.
each
do
|
recipient
|
mailer
.
merged_merge_request_email
(
recipient
.
id
,
merge_request
.
id
,
merge_request
.
author_id_of_changes
)
mailer
.
merged_merge_request_email
(
recipient
.
id
,
merge_request
.
id
,
current_user
.
id
)
end
end
end
end
...
...
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