Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
cef8d1d4
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,发现更多精彩内容 >>
提交
cef8d1d4
编写于
5月 21, 2019
作者:
F
Fabio Pitino
提交者:
James Lopez
5月 21, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add allow_failure attribute to Job API
Closes
https://gitlab.com/gitlab-org/gitlab-ce/issues/50813
上级
ea7b10cd
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
18 addition
and
1 deletion
+18
-1
changelogs/unreleased/add-allow_failure-to-job-api.yml
changelogs/unreleased/add-allow_failure-to-job-api.yml
+5
-0
doc/api/jobs.md
doc/api/jobs.md
+10
-0
lib/api/entities.rb
lib/api/entities.rb
+1
-1
spec/fixtures/api/schemas/public_api/v4/job.json
spec/fixtures/api/schemas/public_api/v4/job.json
+1
-0
spec/requests/api/jobs_spec.rb
spec/requests/api/jobs_spec.rb
+1
-0
未找到文件。
changelogs/unreleased/add-allow_failure-to-job-api.yml
0 → 100644
浏览文件 @
cef8d1d4
---
title
:
Add allow_failure attribute to Job API
merge_request
:
28406
author
:
type
:
added
doc/api/jobs.md
浏览文件 @
cef8d1d4
...
...
@@ -32,6 +32,7 @@ Example of response
"title"
:
"Test the CI integration."
},
"coverage"
:
null
,
"allow_failure"
:
false
,
"created_at"
:
"2015-12-24T15:51:21.727Z"
,
"started_at"
:
"2015-12-24T17:54:24.729Z"
,
"finished_at"
:
"2015-12-24T17:54:24.921Z"
,
...
...
@@ -81,6 +82,7 @@ Example of response
"title"
:
"Test the CI integration."
},
"coverage"
:
null
,
"allow_failure"
:
false
,
"created_at"
:
"2015-12-24T15:51:21.802Z"
,
"started_at"
:
"2015-12-24T17:54:27.722Z"
,
"finished_at"
:
"2015-12-24T17:54:27.895Z"
,
...
...
@@ -165,6 +167,7 @@ Example of response
"title"
:
"Test the CI integration."
},
"coverage"
:
null
,
"allow_failure"
:
false
,
"created_at"
:
"2015-12-24T15:51:21.727Z"
,
"started_at"
:
"2015-12-24T17:54:24.729Z"
,
"finished_at"
:
"2015-12-24T17:54:24.921Z"
,
...
...
@@ -214,6 +217,7 @@ Example of response
"title"
:
"Test the CI integration."
},
"coverage"
:
null
,
"allow_failure"
:
false
,
"created_at"
:
"2015-12-24T15:51:21.802Z"
,
"started_at"
:
"2015-12-24T17:54:27.722Z"
,
"finished_at"
:
"2015-12-24T17:54:27.895Z"
,
...
...
@@ -296,6 +300,7 @@ Example of response
"title"
:
"Test the CI integration."
},
"coverage"
:
null
,
"allow_failure"
:
false
,
"created_at"
:
"2015-12-24T15:51:21.880Z"
,
"started_at"
:
"2015-12-24T17:54:30.733Z"
,
"finished_at"
:
"2015-12-24T17:54:31.198Z"
,
...
...
@@ -528,6 +533,7 @@ Example of response
"title"
:
"Test the CI integration."
},
"coverage"
:
null
,
"allow_failure"
:
false
,
"created_at"
:
"2016-01-11T10:13:33.506Z"
,
"started_at"
:
"2016-01-11T10:14:09.526Z"
,
"finished_at"
:
null
,
...
...
@@ -576,6 +582,7 @@ Example of response
"title"
:
"Test the CI integration."
},
"coverage"
:
null
,
"allow_failure"
:
false
,
"created_at"
:
"2016-01-11T10:13:33.506Z"
,
"started_at"
:
null
,
"finished_at"
:
null
,
...
...
@@ -628,6 +635,7 @@ Example of response
"title"
:
"Test the CI integration."
},
"coverage"
:
null
,
"allow_failure"
:
false
,
"download_url"
:
null
,
"id"
:
42
,
"name"
:
"rubocop"
,
...
...
@@ -681,6 +689,7 @@ Example response:
"title"
:
"Test the CI integration."
},
"coverage"
:
null
,
"allow_failure"
:
false
,
"download_url"
:
null
,
"id"
:
42
,
"name"
:
"rubocop"
,
...
...
@@ -757,6 +766,7 @@ Example of response
"title"
:
"Test the CI integration."
},
"coverage"
:
null
,
"allow_failure"
:
false
,
"created_at"
:
"2016-01-11T10:13:33.506Z"
,
"started_at"
:
null
,
"finished_at"
:
null
,
...
...
lib/api/entities.rb
浏览文件 @
cef8d1d4
...
...
@@ -1266,7 +1266,7 @@ module API
end
class
JobBasic
<
Grape
::
Entity
expose
:id
,
:status
,
:stage
,
:name
,
:ref
,
:tag
,
:coverage
expose
:id
,
:status
,
:stage
,
:name
,
:ref
,
:tag
,
:coverage
,
:allow_failure
expose
:created_at
,
:started_at
,
:finished_at
expose
:duration
expose
:user
,
with:
User
...
...
spec/fixtures/api/schemas/public_api/v4/job.json
浏览文件 @
cef8d1d4
...
...
@@ -28,6 +28,7 @@
"ref"
:
{
"type"
:
"string"
},
"tag"
:
{
"type"
:
"boolean"
},
"coverage"
:
{
"type"
:
[
"number"
,
"null"
]
},
"allow_failure"
:
{
"type"
:
"boolean"
},
"created_at"
:
{
"type"
:
"string"
},
"started_at"
:
{
"type"
:
[
"null"
,
"string"
]
},
"finished_at"
:
{
"type"
:
[
"null"
,
"string"
]
},
...
...
spec/requests/api/jobs_spec.rb
浏览文件 @
cef8d1d4
...
...
@@ -286,6 +286,7 @@ describe API::Jobs do
expect
(
json_response
[
'ref'
]).
to
eq
(
job
.
ref
)
expect
(
json_response
[
'tag'
]).
to
eq
(
job
.
tag
)
expect
(
json_response
[
'coverage'
]).
to
eq
(
job
.
coverage
)
expect
(
json_response
[
'allow_failure'
]).
to
eq
(
job
.
allow_failure
)
expect
(
Time
.
parse
(
json_response
[
'created_at'
])).
to
be_like_time
(
job
.
created_at
)
expect
(
Time
.
parse
(
json_response
[
'started_at'
])).
to
be_like_time
(
job
.
started_at
)
expect
(
Time
.
parse
(
json_response
[
'finished_at'
])).
to
be_like_time
(
job
.
finished_at
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录