Setting
An individual repository setting. These are settings on a repository that can be adjusted by the user. There are currently five different kinds of settings a user can modify:
builds_only_with_travis_yml
(boolean)build_pushes
(boolean)build_pull_requests
(boolean)maximum_number_of_builds
(integer)auto_cancel_pushes
(boolean)auto_cancel_pull_requests
(boolean)share_encrypted_env_with_forks
(boolean)share_ssh_keys_with_forks
(boolean)job_log_time_based_limit
(boolean)job_log_access_based_limit
(boolean)
If querying using the repository slug, it must be formatted using standard URL encoding, including any special characters.
Attributes
Standard Representation
Included when the resource is the main response of a request, or is eager loaded.
Name | Type | Description |
---|---|---|
name | String | The setting's name. |
value | Boolean or integer | The setting's value. |
Minimal Representation
Included when the resource is returned as part of another resource.
Name | Type | Description |
---|---|---|
name | String | The setting's name. |
value | Boolean or integer | The setting's value. |
Actions
Find
This returns a single setting. It is possible to use the repository id or slug in the request.
GET
/repo/{provider}/{repository.id}/setting/{setting.name}
Template Variable | Type | Description |
---|---|---|
provider | Unknown | Documentation missing. |
repository.id | Integer | Value uniquely identifying the repository. |
setting.name | String | The setting's name. |
Query Parameter | Type | Description |
---|---|---|
include | [String] | List of attributes to eager load. |
GET
/repo/{provider}/{repository.slug}/setting/{setting.name}
Template Variable | Type | Description |
---|---|---|
provider | Unknown | Documentation missing. |
repository.slug | String | Same as {repository.owner.name}/{repository.name}. |
setting.name | String | The setting's name. |
Query Parameter | Type | Description |
---|---|---|
include | [String] | List of attributes to eager load. |
GET
/repo/{repository.id}/setting/{setting.name}
Template Variable | Type | Description |
---|---|---|
repository.id | Integer | Value uniquely identifying the repository. |
setting.name | String | The setting's name. |
Query Parameter | Type | Description |
---|---|---|
include | [String] | List of attributes to eager load. |
GET
/repo/{repository.slug}/setting/{setting.name}
Template Variable | Type | Description |
---|---|---|
repository.slug | String | Same as {repository.owner.name}/{repository.name}. |
setting.name | String | The setting's name. |
Query Parameter | Type | Description |
---|---|---|
include | [String] | List of attributes to eager load. |
Update
This updates a single setting. It is possible to use the repository id or slug in the request.
Use namespaced params in the request body to pass the new setting:
curl -X PATCH \ -H "Content-Type: application/json" \ -H "Travis-API-Version: 3" \ -H "Authorization: token xxxxxxxxxxxx" \ -d '{ "setting.value": true }' \ https://api.travis-ci.com/repo/1234/setting/{setting.name}
PATCH
/repo/{provider}/{repository.id}/setting/{setting.name}
Template Variable | Type | Description |
---|---|---|
provider | Unknown | Documentation missing. |
repository.id | Integer | Value uniquely identifying the repository. |
setting.name | String | The setting's name. |
Accepted Parameter | Type | Description |
---|---|---|
setting.value | Boolean or integer | The setting's value. |
PATCH
/repo/{provider}/{repository.slug}/setting/{setting.name}
Template Variable | Type | Description |
---|---|---|
provider | Unknown | Documentation missing. |
repository.slug | String | Same as {repository.owner.name}/{repository.name}. |
setting.name | String | The setting's name. |
Accepted Parameter | Type | Description |
---|---|---|
setting.value | Boolean or integer | The setting's value. |
PATCH
/repo/{repository.id}/setting/{setting.name}
Template Variable | Type | Description |
---|---|---|
repository.id | Integer | Value uniquely identifying the repository. |
setting.name | String | The setting's name. |
Accepted Parameter | Type | Description |
---|---|---|
setting.value | Boolean or integer | The setting's value. |
PATCH
/repo/{repository.slug}/setting/{setting.name}
Template Variable | Type | Description |
---|---|---|
repository.slug | String | Same as {repository.owner.name}/{repository.name}. |
setting.name | String | The setting's name. |
Accepted Parameter | Type | Description |
---|---|---|
setting.value | Boolean or integer | The setting's value. |