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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
95df8663
Commit
95df8663
authored
Oct 22, 2015
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix: Inability to reply to code comments in the MR view, if the MR comes from a fork
parent
b97977af
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
2 deletions
+9
-2
CHANGELOG
CHANGELOG
+1
-0
app/controllers/projects/commits_controller.rb
app/controllers/projects/commits_controller.rb
+1
-1
app/models/merge_request.rb
app/models/merge_request.rb
+1
-1
spec/models/merge_request_spec.rb
spec/models/merge_request_spec.rb
+6
-0
No files found.
CHANGELOG
View file @
95df8663
...
...
@@ -8,6 +8,7 @@ v 8.2.0 (unreleased)
- Improved performance of sorting milestone issues
- Allow users to select the Files view as default project view (Cristian Bica)
- Show "Empty Repository Page" for repository without branches (Artem V. Navrotskiy)
- Fix: Inability to reply to code comments in the MR view, if the MR comes from a fork
v 8.1.0
- Ensure MySQL CI limits DB migrations occur after the fields have been created (Stan Hu)
...
...
app/controllers/projects/commits_controller.rb
View file @
95df8663
...
...
@@ -12,7 +12,7 @@ class Projects::CommitsController < Projects::ApplicationController
@limit
,
@offset
=
(
params
[
:limit
]
||
40
),
(
params
[
:offset
]
||
0
)
@commits
=
@repo
.
commits
(
@ref
,
@path
,
@limit
,
@offset
)
@note_counts
=
Note
.
where
(
commit_id:
@commits
.
map
(
&
:id
)).
@note_counts
=
project
.
notes
.
where
(
commit_id:
@commits
.
map
(
&
:id
)).
group
(
:commit_id
).
count
respond_to
do
|
format
|
...
...
app/models/merge_request.rb
View file @
95df8663
...
...
@@ -257,7 +257,7 @@ class MergeRequest < ActiveRecord::Base
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))"
,
"(
(project_id = :source_project_id OR project_id = :target_project_id)
AND noteable_type = 'Commit' AND commit_id IN (:commit_ids))"
,
mr_id:
id
,
commit_ids:
commit_ids
,
target_project_id:
target_project_id
,
...
...
spec/models/merge_request_spec.rb
View file @
95df8663
...
...
@@ -79,6 +79,12 @@ describe MergeRequest do
expect
(
merge_request
.
commits
).
not_to
be_empty
expect
(
merge_request
.
mr_and_commit_notes
.
count
).
to
eq
(
2
)
end
it
"should include notes for commits from target project as well"
do
create
(
:note
,
commit_id:
merge_request
.
commits
.
first
.
id
,
noteable_type:
'Commit'
,
project:
merge_request
.
target_project
)
expect
(
merge_request
.
commits
).
not_to
be_empty
expect
(
merge_request
.
mr_and_commit_notes
.
count
).
to
eq
(
3
)
end
end
describe
'#is_being_reassigned?'
do
...
...
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