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
Léo-Paul Géneau
gitlab-ce
Commits
4f2e4c76
Commit
4f2e4c76
authored
9 years ago
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Select MR commit notes from source project.
parent
e739eb03
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
app/models/merge_request.rb
app/models/merge_request.rb
+6
-3
No files found.
app/models/merge_request.rb
View file @
4f2e4c76
...
...
@@ -213,10 +213,13 @@ class MergeRequest < ActiveRecord::Base
commits_for_notes_limit
=
100
commit_ids
=
commits
.
last
(
commits_for_notes_limit
).
map
(
&
:
id
)
project
.
notes
.
where
(
"(noteable_type = 'MergeRequest' AND noteable_id = :mr_id) OR (noteable_type = 'Commit' AND commit_id IN (:commit_ids))"
,
Note
.
where
(
"(project_id = :target_project_id AND noteable_type = 'MergeRequest' AND noteable_id = :mr_id) OR"
+
"(project_id = :source_project_id AND noteable_type = 'Commit' AND commit_id IN (:commit_ids))"
,
mr_id:
id
,
commit_ids:
commit_ids
commit_ids:
commit_ids
,
target_project_id:
target_project_id
,
source_project_id:
source_project_id
)
end
...
...
This diff is collapsed.
Click to expand it.
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