diff options
author | Sean McGivern <sean@gitlab.com> | 2017-07-27 15:36:39 +0100 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2017-07-28 16:25:13 +0100 |
commit | 75d04f6a29a5506ffd53c227517411febdc54910 (patch) | |
tree | 9e1234843c638abe5e34299d21348c5bf885a5ec /app/helpers/notes_helper.rb | |
parent | 9981814514742a2ee507d4dcc2fd71099fd96585 (diff) | |
download | gitlab-ce-75d04f6a29a5506ffd53c227517411febdc54910.tar.gz |
Fix replying to commit comments on MRs from forks
A commit comment shows in the MR, but if the MR is from a fork, it will have a
different project ID to the MR's target project. In that case, add an
note_project_id param so that we can pick the correct project for the note.
Diffstat (limited to 'app/helpers/notes_helper.rb')
-rw-r--r-- | app/helpers/notes_helper.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/helpers/notes_helper.rb b/app/helpers/notes_helper.rb index 0a0881d95cf..8f4e39b8b23 100644 --- a/app/helpers/notes_helper.rb +++ b/app/helpers/notes_helper.rb @@ -62,7 +62,11 @@ module NotesHelper def link_to_reply_discussion(discussion, line_type = nil) return unless current_user - data = { discussion_id: discussion.reply_id, line_type: line_type } + data = { + discussion_id: discussion.reply_id, + discussion_project_id: discussion.project&.id, + line_type: line_type + } button_tag 'Reply...', class: 'btn btn-text-field js-discussion-reply-button', data: data, title: 'Add a reply' |