Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
99c2f3b3
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 搜索 >>
提交
99c2f3b3
编写于
8月 23, 2016
作者:
B
Ben Boeckel
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
api: expose wiki_page_events project hook field in the API
上级
f413d7ed
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
12 addition
and
1 deletion
+12
-1
CHANGELOG
CHANGELOG
+1
-0
doc/api/projects.md
doc/api/projects.md
+3
-0
lib/api/entities.rb
lib/api/entities.rb
+1
-1
lib/api/project_hooks.rb
lib/api/project_hooks.rb
+2
-0
spec/factories/project_hooks.rb
spec/factories/project_hooks.rb
+1
-0
spec/requests/api/project_hooks_spec.rb
spec/requests/api/project_hooks_spec.rb
+4
-0
未找到文件。
CHANGELOG
浏览文件 @
99c2f3b3
...
...
@@ -3,6 +3,7 @@ Please view this file on the master branch, on stable branches it's out of date.
v 8.12.0 (unreleased)
- Change merge_error column from string to text type
- Optimistic locking for Issues and Merge Requests (title and description overriding prevention)
- Add `wiki_page_events` to project hook APIs (Ben Boeckel)
- Added tests for diff notes
v 8.11.1 (unreleased)
...
...
doc/api/projects.md
浏览文件 @
99c2f3b3
...
...
@@ -918,6 +918,7 @@ Parameters:
"note_events"
:
true
,
"build_events"
:
true
,
"pipeline_events"
:
true
,
"wiki_page_events"
:
true
,
"enable_ssl_verification"
:
true
,
"created_at"
:
"2012-10-12T17:04:47Z"
}
...
...
@@ -942,6 +943,7 @@ Parameters:
-
`note_events`
- Trigger hook on note events
-
`build_events`
- Trigger hook on build events
-
`pipeline_events`
- Trigger hook on pipeline events
-
`wiki_page_events`
- Trigger hook on wiki page events
-
`enable_ssl_verification`
- Do SSL verification when triggering the hook
### Edit project hook
...
...
@@ -964,6 +966,7 @@ Parameters:
-
`note_events`
- Trigger hook on note events
-
`build_events`
- Trigger hook on build events
-
`pipeline_events`
- Trigger hook on pipeline events
-
`wiki_page_events`
- Trigger hook on wiki page events
-
`enable_ssl_verification`
- Do SSL verification when triggering the hook
### Delete project hook
...
...
lib/api/entities.rb
浏览文件 @
99c2f3b3
...
...
@@ -49,7 +49,7 @@ module API
class
ProjectHook
<
Hook
expose
:project_id
,
:push_events
expose
:issues_events
,
:merge_requests_events
,
:tag_push_events
expose
:note_events
,
:build_events
,
:pipeline_events
expose
:note_events
,
:build_events
,
:pipeline_events
,
:wiki_page_events
expose
:enable_ssl_verification
end
...
...
lib/api/project_hooks.rb
浏览文件 @
99c2f3b3
...
...
@@ -46,6 +46,7 @@ module API
:note_events
,
:build_events
,
:pipeline_events
,
:wiki_page_events
,
:enable_ssl_verification
]
@hook
=
user_project
.
hooks
.
new
(
attrs
)
...
...
@@ -80,6 +81,7 @@ module API
:note_events
,
:build_events
,
:pipeline_events
,
:wiki_page_events
,
:enable_ssl_verification
]
...
...
spec/factories/project_hooks.rb
浏览文件 @
99c2f3b3
...
...
@@ -14,6 +14,7 @@ FactoryGirl.define do
note_events
true
build_events
true
pipeline_events
true
wiki_page_events
true
end
end
end
spec/requests/api/project_hooks_spec.rb
浏览文件 @
99c2f3b3
...
...
@@ -34,6 +34,7 @@ describe API::API, 'ProjectHooks', api: true do
expect
(
json_response
.
first
[
'note_events'
]).
to
eq
(
true
)
expect
(
json_response
.
first
[
'build_events'
]).
to
eq
(
true
)
expect
(
json_response
.
first
[
'pipeline_events'
]).
to
eq
(
true
)
expect
(
json_response
.
first
[
'wiki_page_events'
]).
to
eq
(
true
)
expect
(
json_response
.
first
[
'enable_ssl_verification'
]).
to
eq
(
true
)
end
end
...
...
@@ -59,6 +60,7 @@ describe API::API, 'ProjectHooks', api: true do
expect
(
json_response
[
'note_events'
]).
to
eq
(
hook
.
note_events
)
expect
(
json_response
[
'build_events'
]).
to
eq
(
hook
.
build_events
)
expect
(
json_response
[
'pipeline_events'
]).
to
eq
(
hook
.
pipeline_events
)
expect
(
json_response
[
'wiki_page_events'
]).
to
eq
(
hook
.
wiki_page_events
)
expect
(
json_response
[
'enable_ssl_verification'
]).
to
eq
(
hook
.
enable_ssl_verification
)
end
...
...
@@ -95,6 +97,7 @@ describe API::API, 'ProjectHooks', api: true do
expect
(
json_response
[
'note_events'
]).
to
eq
(
false
)
expect
(
json_response
[
'build_events'
]).
to
eq
(
false
)
expect
(
json_response
[
'pipeline_events'
]).
to
eq
(
false
)
expect
(
json_response
[
'wiki_page_events'
]).
to
eq
(
false
)
expect
(
json_response
[
'enable_ssl_verification'
]).
to
eq
(
true
)
end
...
...
@@ -122,6 +125,7 @@ describe API::API, 'ProjectHooks', api: true do
expect
(
json_response
[
'note_events'
]).
to
eq
(
hook
.
note_events
)
expect
(
json_response
[
'build_events'
]).
to
eq
(
hook
.
build_events
)
expect
(
json_response
[
'pipeline_events'
]).
to
eq
(
hook
.
pipeline_events
)
expect
(
json_response
[
'wiki_page_events'
]).
to
eq
(
hook
.
wiki_page_events
)
expect
(
json_response
[
'enable_ssl_verification'
]).
to
eq
(
hook
.
enable_ssl_verification
)
end
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录