Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
a7892e71
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 搜索 >>
提交
a7892e71
编写于
5月 15, 2019
作者:
M
Mathieu Parent
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add build_timeout to project API
上级
353e6877
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
6 addition
and
0 deletion
+6
-0
doc/api/projects.md
doc/api/projects.md
+3
-0
lib/api/entities.rb
lib/api/entities.rb
+1
-0
lib/api/helpers/projects_helpers.rb
lib/api/helpers/projects_helpers.rb
+2
-0
未找到文件。
doc/api/projects.md
浏览文件 @
a7892e71
...
...
@@ -734,6 +734,7 @@ POST /projects
|
`avatar`
| mixed | no | Image file for avatar of the project |
|
`printing_merge_request_link_enabled`
| boolean | no | Show link to create/view merge request when pushing from the command line |
|
`build_git_strategy`
| string | no | The Git strategy. Defaults to
`fetch`
|
|
`build_timeout`
| integer | no | The maximum amount of time in minutes that a job is able run (in seconds) |
|
`ci_config_path`
| string | no | The path to CI config file |
|
`repository_storage`
| string | no | Which storage shard the repository is on. Available only to admins |
|
`approvals_before_merge`
| integer | no |
**[STARTER]**
How many approvers should approve merge requests by default |
...
...
@@ -786,6 +787,7 @@ POST /projects/user/:user_id
|
`avatar`
| mixed | no | Image file for avatar of the project |
|
`printing_merge_request_link_enabled`
| boolean | no | Show link to create/view merge request when pushing from the command line |
|
`build_git_strategy`
| string | no | The Git strategy. Defaults to
`fetch`
|
|
`build_timeout`
| integer | no | The maximum amount of time in minutes that a job is able run (in seconds) |
|
`ci_config_path`
| string | no | The path to CI config file |
|
`repository_storage`
| string | no | Which storage shard the repository is on. Available only to admins |
|
`approvals_before_merge`
| integer | no |
**[STARTER]**
How many approvers should approve merge requests by default |
...
...
@@ -837,6 +839,7 @@ PUT /projects/:id
|
`tag_list`
| array | no | The list of tags for a project; put array of tags, that should be finally assigned to a project |
|
`avatar`
| mixed | no | Image file for avatar of the project |
|
`build_git_strategy`
| string | no | The Git strategy. Defaults to
`fetch`
|
|
`build_timeout`
| integer | no | The maximum amount of time in minutes that a job is able run (in seconds) |
|
`ci_config_path`
| string | no | The path to CI config file |
|
`ci_default_git_depth`
| integer | no | Default number of revisions for
[
shallow cloning
](
../user/project/pipelines/settings.md#git-shallow-clone
)
|
|
`repository_storage`
| string | no | Which storage shard the repository is on. Available only to admins |
...
...
lib/api/entities.rb
浏览文件 @
a7892e71
...
...
@@ -278,6 +278,7 @@ module API
expose
:build_git_strategy
,
if:
lambda
{
|
project
,
options
|
options
[
:user_can_admin_project
]
}
do
|
project
,
options
|
project
.
build_allow_git_fetch
?
'fetch'
:
'clone'
end
expose
:build_timeout
expose
:ci_config_path
,
if:
->
(
project
,
options
)
{
Ability
.
allowed?
(
options
[
:current_user
],
:download_code
,
project
)
}
expose
:shared_with_groups
do
|
project
,
options
|
SharedGroup
.
represent
(
project
.
project_group_links
,
options
)
...
...
lib/api/helpers/projects_helpers.rb
浏览文件 @
a7892e71
...
...
@@ -9,6 +9,7 @@ module API
params
:optional_project_params_ce
do
optional
:description
,
type:
String
,
desc:
'The description of the project'
optional
:build_git_strategy
,
type:
String
,
values:
%w(fetch clone)
,
desc:
'The Git strategy. Defaults to `fetch`'
optional
:build_timeout
,
type:
Integer
,
desc:
'Build timeout'
optional
:ci_config_path
,
type:
String
,
desc:
'The path to CI config file. Defaults to `.gitlab-ci.yml`'
# TODO: remove in API v5, replaced by *_access_level
...
...
@@ -60,6 +61,7 @@ module API
def
self
.
update_params_at_least_one_of
[
:build_git_strategy
,
:build_timeout
,
:builds_access_level
,
:ci_config_path
,
:container_registry_enabled
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录