Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
m0_70890014
gitlabhq
提交
95df8663
G
gitlabhq
项目概览
m0_70890014
/
gitlabhq
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlabhq
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
95df8663
编写于
10月 22, 2015
作者:
V
Valery Sizov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix: Inability to reply to code comments in the MR view, if the MR comes from a fork
上级
b97977af
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
9 addition
and
2 deletion
+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
未找到文件。
CHANGELOG
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录