Set a repository's merge train settings
import requests
url = "https://platform.ankra.app/api/v1/org/pipeline-repositories/{repository_id}/merge-train/settings"
payload = { "enabled": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true})
};
fetch('https://platform.ankra.app/api/v1/org/pipeline-repositories/{repository_id}/merge-train/settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://platform.ankra.app/api/v1/org/pipeline-repositories/{repository_id}/merge-train/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true
}
'{
"enabled": true,
"max_cars": 4
}Pipelines
Set a repository's merge train settings
Switches the repository’s merge train on or off and sets how many pull requests it tests at once. Switching it off empties the train: every pull request in it leaves, and its car’s run stops. GitHub repositories only. Requires pipelines.manage.
PUT
/
api
/
v1
/
org
/
pipeline-repositories
/
{repository_id}
/
merge-train
/
settings
Set a repository's merge train settings
import requests
url = "https://platform.ankra.app/api/v1/org/pipeline-repositories/{repository_id}/merge-train/settings"
payload = { "enabled": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true})
};
fetch('https://platform.ankra.app/api/v1/org/pipeline-repositories/{repository_id}/merge-train/settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://platform.ankra.app/api/v1/org/pipeline-repositories/{repository_id}/merge-train/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true
}
'{
"enabled": true,
"max_cars": 4
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json