summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-10-22 11:51:01 +0000
committerRémy Coutable <remy@rymai.me>2016-10-22 11:51:01 +0000
commitfc03440650f811890a75ea87eecbc39b694ce722 (patch)
treeb2da0a3df79c21c7d43677af2f9d260ef915cb64
parente4937e2800c6405e3f9f50abec4b5b0caf03dae1 (diff)
parent3a29ea9da0abd6cfd0788f6d717a08862ed6b062 (diff)
downloadgitlab-ce-fc03440650f811890a75ea87eecbc39b694ce722.tar.gz
Merge branch '23146_19131_build-api_scope-doc' into 'master'
Fix documents and comments on Build API `scope` Fixes #23146 Fixes #19131 See merge request !7044
-rw-r--r--CHANGELOG.md1
-rw-r--r--doc/api/builds.md8
-rw-r--r--lib/api/builds.rb4
3 files changed, 7 insertions, 6 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5d8c782c2c2..f158e5d7758 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,7 @@ Please view this file on the master branch, on stable branches it's out of date.
- Fix: Backup restore doesn't clear cache
- Use MergeRequestsClosingIssues cache data on Issue#closed_by_merge_requests method
+ - Fix documents and comments on Build API `scope`
## 8.13.0 (2016-10-22)
diff --git a/doc/api/builds.md b/doc/api/builds.md
index e40f198696d..0476cac0eda 100644
--- a/doc/api/builds.md
+++ b/doc/api/builds.md
@@ -11,10 +11,10 @@ GET /projects/:id/builds
| Attribute | Type | Required | Description |
|-----------|---------|----------|---------------------|
| `id` | integer | yes | The ID of a project |
-| `scope` | string **or** array of strings | no | The scope of builds to show, one or array of: `pending`, `running`, `failed`, `success`, `canceled`; showing all builds if none provided |
+| `scope` | string **or** array of strings | no | The scope of builds to show, one or array of: `created`, `pending`, `running`, `failed`, `success`, `canceled`, `skipped`; showing all builds if none provided |
```
-curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/builds"
+curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" 'https://gitlab.example.com/api/v3/projects/1/builds?scope%5B0%5D=pending&scope%5B1%5D=running'
```
Example of response
@@ -132,10 +132,10 @@ GET /projects/:id/repository/commits/:sha/builds
|-----------|---------|----------|---------------------|
| `id` | integer | yes | The ID of a project |
| `sha` | string | yes | The SHA id of a commit |
-| `scope` | string **or** array of strings | no | The scope of builds to show, one or array of: `pending`, `running`, `failed`, `success`, `canceled`; showing all builds if none provided |
+| `scope` | string **or** array of strings | no | The scope of builds to show, one or array of: `created`, `pending`, `running`, `failed`, `success`, `canceled`, `skipped`; showing all builds if none provided |
```
-curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/repository/commits/0ff3ae198f8601a285adcf5c0fff204ee6fba5fd/builds"
+curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" 'https://gitlab.example.com/api/v3/projects/1/repository/commits/0ff3ae198f8601a285adcf5c0fff204ee6fba5fd/builds?scope%5B0%5D=pending&scope%5B1%5D=running'
```
Example of response
diff --git a/lib/api/builds.rb b/lib/api/builds.rb
index 52bdbcae5a8..7b00c5037f1 100644
--- a/lib/api/builds.rb
+++ b/lib/api/builds.rb
@@ -8,7 +8,7 @@ module API
#
# Parameters:
# id (required) - The ID of a project
- # scope (optional) - The scope of builds to show (one or array of: pending, running, failed, success, canceled;
+ # scope (optional) - The scope of builds to show (one or array of: created, pending, running, failed, success, canceled, skipped;
# if none provided showing all builds)
# Example Request:
# GET /projects/:id/builds
@@ -25,7 +25,7 @@ module API
# Parameters:
# id (required) - The ID of a project
# sha (required) - The SHA id of a commit
- # scope (optional) - The scope of builds to show (one or array of: pending, running, failed, success, canceled;
+ # scope (optional) - The scope of builds to show (one or array of: created, pending, running, failed, success, canceled, skipped;
# if none provided showing all builds)
# Example Request:
# GET /projects/:id/repository/commits/:sha/builds