Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
77abf8cc
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 搜索 >>
提交
77abf8cc
编写于
8月 25, 2016
作者:
C
Clement Ho
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Capitalize mentioned issue timeline notes
上级
0b4fef6b
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
16 addition
and
15 deletion
+16
-15
CHANGELOG
CHANGELOG
+1
-0
app/services/system_note_service.rb
app/services/system_note_service.rb
+5
-5
features/steps/shared/issuable.rb
features/steps/shared/issuable.rb
+1
-1
spec/features/issues/new_branch_button_spec.rb
spec/features/issues/new_branch_button_spec.rb
+1
-1
spec/features/notes_on_merge_requests_spec.rb
spec/features/notes_on_merge_requests_spec.rb
+1
-1
spec/models/note_spec.rb
spec/models/note_spec.rb
+1
-1
spec/requests/api/notes_spec.rb
spec/requests/api/notes_spec.rb
+1
-1
spec/services/system_note_service_spec.rb
spec/services/system_note_service_spec.rb
+5
-5
未找到文件。
CHANGELOG
浏览文件 @
77abf8cc
...
...
@@ -11,6 +11,7 @@ v 8.12.0 (unreleased)
- Added tests for diff notes
- Added 'only_allow_merge_if_build_succeeds' project setting in the API. !5930 (Duck)
- Reduce number of database queries on builds tab
- Capitalize mentioned issue timeline notes (ClemMakesApps)
- Use the default branch for displaying the project icon instead of master !5792 (Hannes Rosenögger)
v 8.11.2 (unreleased)
...
...
app/services/system_note_service.rb
浏览文件 @
77abf8cc
...
...
@@ -269,11 +269,11 @@ module SystemNoteService
#
# Example Note text:
#
# "
m
entioned in #1"
# "
M
entioned in #1"
#
# "
m
entioned in !2"
# "
M
entioned in !2"
#
# "
m
entioned in 54f7727c"
# "
M
entioned in 54f7727c"
#
# See cross_reference_note_content.
#
...
...
@@ -308,7 +308,7 @@ module SystemNoteService
# Check if a cross-reference is disallowed
#
# This method prevents adding a "
m
entioned in !1" note on every single commit
# This method prevents adding a "
M
entioned in !1" note on every single commit
# in a merge request. Additionally, it prevents the creation of references to
# external issues (which would fail).
#
...
...
@@ -417,7 +417,7 @@ module SystemNoteService
end
def
cross_reference_note_prefix
'
m
entioned in '
'
M
entioned in '
end
def
cross_reference_note_content
(
gfm_reference
)
...
...
features/steps/shared/issuable.rb
浏览文件 @
77abf8cc
...
...
@@ -179,7 +179,7 @@ module SharedIssuable
project
=
Project
.
find_by
(
name:
from_project_name
)
expect
(
page
).
to
have_content
(
user_name
)
expect
(
page
).
to
have_content
(
"
m
entioned in
#{
issuable
.
class
.
to_s
.
titleize
.
downcase
}
#{
issuable
.
to_reference
(
project
)
}
"
)
expect
(
page
).
to
have_content
(
"
M
entioned in
#{
issuable
.
class
.
to_s
.
titleize
.
downcase
}
#{
issuable
.
to_reference
(
project
)
}
"
)
end
def
expect_sidebar_content
(
content
)
...
...
spec/features/issues/new_branch_button_spec.rb
浏览文件 @
77abf8cc
...
...
@@ -20,7 +20,7 @@ feature 'Start new branch from an issue', feature: true do
context
"when there is a referenced merge request"
do
let
(
:note
)
do
create
(
:note
,
:on_issue
,
:system
,
project:
project
,
note:
"
m
entioned in !
#{
referenced_mr
.
iid
}
"
)
note:
"
M
entioned in !
#{
referenced_mr
.
iid
}
"
)
end
let
(
:referenced_mr
)
do
create
(
:merge_request
,
:simple
,
source_project:
project
,
target_project:
project
,
...
...
spec/features/notes_on_merge_requests_spec.rb
浏览文件 @
77abf8cc
...
...
@@ -141,7 +141,7 @@ describe 'Comments', feature: true do
let
(
:project2
)
{
create
(
:project
,
:private
)
}
let
(
:issue
)
{
create
(
:issue
,
project:
project2
)
}
let
(
:merge_request
)
{
create
(
:merge_request
,
source_project:
project
,
source_branch:
'markdown'
)
}
let!
(
:note
)
{
create
(
:note_on_merge_request
,
:system
,
noteable:
merge_request
,
project:
project
,
note:
"
m
entioned in
#{
issue
.
to_reference
(
project
)
}
"
)
}
let!
(
:note
)
{
create
(
:note_on_merge_request
,
:system
,
noteable:
merge_request
,
project:
project
,
note:
"
M
entioned in
#{
issue
.
to_reference
(
project
)
}
"
)
}
it
'shows the system note'
do
login_as
:admin
...
...
spec/models/note_spec.rb
浏览文件 @
77abf8cc
...
...
@@ -225,7 +225,7 @@ describe Note, models: true do
let
(
:note
)
do
create
:note
,
noteable:
ext_issue
,
project:
ext_proj
,
note:
"
m
entioned in issue
#{
private_issue
.
to_reference
(
ext_proj
)
}
"
,
note:
"
M
entioned in issue
#{
private_issue
.
to_reference
(
ext_proj
)
}
"
,
system:
true
end
...
...
spec/requests/api/notes_spec.rb
浏览文件 @
77abf8cc
...
...
@@ -25,7 +25,7 @@ describe API::API, api: true do
let!
(
:cross_reference_note
)
do
create
:note
,
noteable:
ext_issue
,
project:
ext_proj
,
note:
"
m
entioned in issue
#{
private_issue
.
to_reference
(
ext_proj
)
}
"
,
note:
"
M
entioned in issue
#{
private_issue
.
to_reference
(
ext_proj
)
}
"
,
system:
true
end
...
...
spec/services/system_note_service_spec.rb
浏览文件 @
77abf8cc
...
...
@@ -330,13 +330,13 @@ describe SystemNoteService, services: true do
let
(
:mentioner
)
{
project2
.
repository
.
commit
}
it
'references the mentioning commit'
do
expect
(
subject
.
note
).
to
eq
"
m
entioned in commit
#{
mentioner
.
to_reference
(
project
)
}
"
expect
(
subject
.
note
).
to
eq
"
M
entioned in commit
#{
mentioner
.
to_reference
(
project
)
}
"
end
end
context
'from non-Commit'
do
it
'references the mentioning object'
do
expect
(
subject
.
note
).
to
eq
"
m
entioned in issue
#{
mentioner
.
to_reference
(
project
)
}
"
expect
(
subject
.
note
).
to
eq
"
M
entioned in issue
#{
mentioner
.
to_reference
(
project
)
}
"
end
end
end
...
...
@@ -346,13 +346,13 @@ describe SystemNoteService, services: true do
let
(
:mentioner
)
{
project
.
repository
.
commit
}
it
'references the mentioning commit'
do
expect
(
subject
.
note
).
to
eq
"
m
entioned in commit
#{
mentioner
.
to_reference
}
"
expect
(
subject
.
note
).
to
eq
"
M
entioned in commit
#{
mentioner
.
to_reference
}
"
end
end
context
'from non-Commit'
do
it
'references the mentioning object'
do
expect
(
subject
.
note
).
to
eq
"
m
entioned in issue
#{
mentioner
.
to_reference
}
"
expect
(
subject
.
note
).
to
eq
"
M
entioned in issue
#{
mentioner
.
to_reference
}
"
end
end
end
...
...
@@ -362,7 +362,7 @@ describe SystemNoteService, services: true do
describe
'.cross_reference?'
do
it
'is truthy when text begins with expected text'
do
expect
(
described_class
.
cross_reference?
(
'
m
entioned in something'
)).
to
be_truthy
expect
(
described_class
.
cross_reference?
(
'
M
entioned in something'
)).
to
be_truthy
end
it
'is falsey when text does not begin with expected text'
do
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录