Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
5bf47f14
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
5bf47f14
编写于
4月 07, 2016
作者:
T
theoretick
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Do not include award emojis in issue view comment_count
Fixes Issue #14431
上级
9cd5e0fc
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
43 addition
and
5 deletion
+43
-5
CHANGELOG
CHANGELOG
+1
-0
app/views/projects/issues/_issue.html.haml
app/views/projects/issues/_issue.html.haml
+1
-1
app/views/projects/merge_requests/_merge_request.html.haml
app/views/projects/merge_requests/_merge_request.html.haml
+1
-1
app/views/projects/merge_requests/_show.html.haml
app/views/projects/merge_requests/_show.html.haml
+1
-1
spec/features/issues_spec.rb
spec/features/issues_spec.rb
+14
-2
spec/features/notes_on_merge_requests_spec.rb
spec/features/notes_on_merge_requests_spec.rb
+25
-0
未找到文件。
CHANGELOG
浏览文件 @
5bf47f14
...
...
@@ -8,6 +8,7 @@ v 8.7.0 (unreleased)
- Loading of an issue's referenced merge requests and related branches is now done asynchronously (Yorick Peterse)
- Enable gzip for assets, makes the page size significantly smaller. !3544 / !3632 (Connor Shea)
- Load award emoji images separately unless opening the full picker. Saves several hundred KBs of data for most pages. (Connor Shea)
- Do not include award_emojis in issue and merge_request comment_count !3610 (Lucas Charles)
- All images in discussions and wikis now link to their source files !3464 (Connor Shea).
- Return status code 303 after a branch DELETE operation to avoid project deletion (Stan Hu)
- Add setting for customizing the list of trusted proxies !3524
...
...
app/views/projects/issues/_issue.html.haml
浏览文件 @
5bf47f14
...
...
@@ -27,7 +27,7 @@
=
icon
(
'thumbs-down'
)
=
downvotes
-
note_count
=
issue
.
notes
.
user
.
count
-
note_count
=
issue
.
notes
.
user
.
nonawards
.
count
-
if
note_count
>
0
%li
=
link_to
issue_path
(
issue
)
+
"#notes"
do
...
...
app/views/projects/merge_requests/_merge_request.html.haml
浏览文件 @
5bf47f14
...
...
@@ -35,7 +35,7 @@
=
icon
(
'thumbs-down'
)
=
downvotes
-
note_count
=
merge_request
.
mr_and_commit_notes
.
user
.
count
-
note_count
=
merge_request
.
mr_and_commit_notes
.
user
.
nonawards
.
count
-
if
note_count
>
0
%li
=
link_to
merge_request_path
(
merge_request
)
+
"#notes"
do
...
...
app/views/projects/merge_requests/_show.html.haml
浏览文件 @
5bf47f14
...
...
@@ -51,7 +51,7 @@
%li
.notes-tab
=
link_to
namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
),
data:
{
target:
'div#notes'
,
action:
'notes'
,
toggle:
'tab'
}
do
Discussion
%span
.badge
=
@merge_request
.
mr_and_commit_notes
.
user
.
count
%span
.badge
=
@merge_request
.
mr_and_commit_notes
.
user
.
nonawards
.
count
%li
.commits-tab
=
link_to
commits_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
),
data:
{
target:
'div#commits'
,
action:
'commits'
,
toggle:
'tab'
}
do
Commits
...
...
spec/features/issues_spec.rb
浏览文件 @
5bf47f14
...
...
@@ -45,7 +45,7 @@ describe 'Issues', feature: true do
project:
project
)
end
it
'allows user to select unasigned'
,
js:
true
do
it
'allows user to select unas
s
igned'
,
js:
true
do
visit
edit_namespace_project_issue_path
(
project
.
namespace
,
project
,
issue
)
expect
(
page
).
to
have_content
"Assignee
#{
@user
.
name
}
"
...
...
@@ -64,6 +64,18 @@ describe 'Issues', feature: true do
end
end
describe
'Issue info'
do
it
'excludes award_emoji from comment count'
do
issue
=
create
(
:issue
,
author:
@user
,
assignee:
@user
,
project:
project
,
title:
'foobar'
)
create
(
:upvote_note
,
noteable:
issue
)
visit
namespace_project_issues_path
(
project
.
namespace
,
project
,
assignee_id:
@user
.
id
)
expect
(
page
).
to
have_content
'foobar'
expect
(
page
.
all
(
'.issue-no-comments'
).
first
.
text
).
to
eq
"0"
end
end
describe
'Filter issue'
do
before
do
[
'foobar'
,
'barbaz'
,
'gitlab'
].
each
do
|
title
|
...
...
@@ -187,7 +199,7 @@ describe 'Issues', feature: true do
describe
'update assignee from issue#show'
do
let
(
:issue
)
{
create
(
:issue
,
project:
project
,
author:
@user
,
assignee:
@user
)
}
context
'by autorized user'
do
context
'by aut
h
orized user'
do
it
'allows user to select unassigned'
,
js:
true
do
visit
namespace_project_issue_path
(
project
.
namespace
,
project
,
issue
)
...
...
spec/features/notes_on_merge_requests_spec.rb
浏览文件 @
5bf47f14
...
...
@@ -4,6 +4,20 @@ describe 'Comments', feature: true do
include
RepoHelpers
include
WaitForAjax
describe
'On merge requests page'
,
feature:
true
do
it
'excludes award_emoji from comment count'
do
merge_request
=
create
(
:merge_request
)
project
=
merge_request
.
source_project
create
(
:upvote_note
,
noteable:
merge_request
,
project:
project
)
login_as
:admin
visit
namespace_project_merge_requests_path
(
project
.
namespace
,
project
)
expect
(
merge_request
.
mr_and_commit_notes
.
count
).
to
eq
1
expect
(
page
.
all
(
'.merge-request-no-comments'
).
first
.
text
).
to
eq
"0"
end
end
describe
'On a merge request'
,
js:
true
,
feature:
true
do
let!
(
:merge_request
)
{
create
(
:merge_request
)
}
let!
(
:project
)
{
merge_request
.
source_project
}
...
...
@@ -129,6 +143,17 @@ describe 'Comments', feature: true do
end
end
end
describe
'comment info'
do
it
'excludes award_emoji from comment count'
do
create
(
:upvote_note
,
noteable:
merge_request
,
project:
project
)
visit
namespace_project_merge_request_path
(
project
.
namespace
,
project
,
merge_request
)
expect
(
merge_request
.
mr_and_commit_notes
.
count
).
to
eq
2
expect
(
find
(
'.notes-tab span.badge'
).
text
).
to
eq
"1"
end
end
end
describe
'On a merge request diff'
,
js:
true
,
feature:
true
do
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录