summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-10-28 13:09:51 +0100
committerDouwe Maan <douwe@gitlab.com>2015-10-28 13:09:51 +0100
commitaaa93d5add41661b657c3a684e23c4084f6292b5 (patch)
tree65a0efc5bbc289a40f0970d27073f9a4d816959f
parent940d68cc4c349b574166b010666a36cf25f485b7 (diff)
downloadgitlab-ce-aaa93d5add41661b657c3a684e23c4084f6292b5.tar.gz
Use issue editor as cross reference comment author when issue is edited with a new mention.edit-new-cross-references
-rw-r--r--CHANGELOG1
-rw-r--r--app/services/issues/update_service.rb2
-rw-r--r--app/services/merge_requests/update_service.rb2
-rw-r--r--app/services/notes/update_service.rb2
4 files changed, 4 insertions, 3 deletions
diff --git a/CHANGELOG b/CHANGELOG
index ea8c6fb5c17..5fe1d957eb9 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -12,6 +12,7 @@ v 8.2.0 (unreleased)
- Use git follow flag for commits page when retrieve history for file or directory
- Show merge request CI status on merge requests index page
- Fix: 500 error returned if destroy request without HTTP referer (Kazuki Shimizu)
+ - Use issue editor as cross reference comment author when issue is edited with a new mention.
v 8.1.1
- Fix cloning Wiki repositories via HTTP (Stan Hu)
diff --git a/app/services/issues/update_service.rb b/app/services/issues/update_service.rb
index 2b5426ad452..551325e4cab 100644
--- a/app/services/issues/update_service.rb
+++ b/app/services/issues/update_service.rb
@@ -35,7 +35,7 @@ module Issues
create_title_change_note(issue, issue.previous_changes['title'].first)
end
- issue.create_new_cross_references!
+ issue.create_new_cross_references!(current_user)
execute_hooks(issue, 'update')
end
diff --git a/app/services/merge_requests/update_service.rb b/app/services/merge_requests/update_service.rb
index ebbe0af803b..61f7d2bbe89 100644
--- a/app/services/merge_requests/update_service.rb
+++ b/app/services/merge_requests/update_service.rb
@@ -59,7 +59,7 @@ module MergeRequests
merge_request.mark_as_unchecked
end
- merge_request.create_new_cross_references!
+ merge_request.create_new_cross_references!(current_user)
execute_hooks(merge_request, 'update')
end
diff --git a/app/services/notes/update_service.rb b/app/services/notes/update_service.rb
index 6c2f08e5963..72e2f78008d 100644
--- a/app/services/notes/update_service.rb
+++ b/app/services/notes/update_service.rb
@@ -4,7 +4,7 @@ module Notes
return note unless note.editable?
note.update_attributes(params.merge(updated_by: current_user))
- note.create_new_cross_references!
+ note.create_new_cross_references!(current_user)
note.reset_events_cache
note