Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
5028f5d7
Commit
5028f5d7
authored
May 15, 2019
by
Mathieu Parent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add auto_cancel_pending_pipelines to project API
parent
5f04d249
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
0 deletions
+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
No files found.
doc/api/projects.md
View file @
5028f5d7
...
...
@@ -735,6 +735,7 @@ POST /projects
|
`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) |
|
`auto_cancel_pending_pipelines`
| string | no | Auto-cancel pending pipelines (Note: this is not a boolean, but enabled/disabled |
|
`build_coverage_regex`
| string | no | Test coverage parsing |
|
`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 |
...
...
@@ -789,6 +790,7 @@ POST /projects/user/:user_id
|
`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) |
|
`auto_cancel_pending_pipelines`
| string | no | Auto-cancel pending pipelines (Note: this is not a boolean, but enabled/disabled |
|
`build_coverage_regex`
| string | no | Test coverage parsing |
|
`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 |
...
...
@@ -842,6 +844,7 @@ PUT /projects/:id
|
`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) |
|
`auto_cancel_pending_pipelines`
| string | no | Auto-cancel pending pipelines (Note: this is not a boolean, but enabled/disabled |
|
`build_coverage_regex`
| string | no | Test coverage parsing |
|
`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
)
|
...
...
lib/api/entities.rb
View file @
5028f5d7
...
...
@@ -279,6 +279,7 @@ module API
project
.
build_allow_git_fetch
?
'fetch'
:
'clone'
end
expose
:build_timeout
expose
:auto_cancel_pending_pipelines
expose
:build_coverage_regex
expose
:ci_config_path
,
if:
->
(
project
,
options
)
{
Ability
.
allowed?
(
options
[
:current_user
],
:download_code
,
project
)
}
expose
:shared_with_groups
do
|
project
,
options
|
...
...
lib/api/helpers/projects_helpers.rb
View file @
5028f5d7
...
...
@@ -10,6 +10,7 @@ module API
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
:auto_cancel_pending_pipelines
,
type:
String
,
values:
%w(disabled enabled)
,
desc:
'Auto-cancel pending pipelines'
optional
:build_coverage_regex
,
type:
String
,
desc:
'Test coverage parsing'
optional
:ci_config_path
,
type:
String
,
desc:
'The path to CI config file. Defaults to `.gitlab-ci.yml`'
...
...
@@ -61,6 +62,7 @@ module API
def
self
.
update_params_at_least_one_of
[
:auto_cancel_pending_pipelines
,
:build_coverage_regex
,
:build_git_strategy
,
:build_timeout
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment