import requests
url = "https://platform.ankra.app/org/applications/{application_id}/auto-merge-setup-pull-requests"
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/org/applications/{application_id}/auto-merge-setup-pull-requests', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://platform.ankra.app/org/applications/{application_id}/auto-merge-setup-pull-requests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true
}
'{
"enabled": true,
"organisation_enabled": true,
"effective": true
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Set an application's setup pull request auto-merge setting (browser session)
Set whether Ankra may merge this application’s setup pull requests on its own: true or false is the application’s own answer and wins over its organisation’s setting either way, and null clears it so the application follows its organisation again. Read fresh on every merge decision, so it needs no redeploy. Organisation administrators only.
import requests
url = "https://platform.ankra.app/org/applications/{application_id}/auto-merge-setup-pull-requests"
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/org/applications/{application_id}/auto-merge-setup-pull-requests', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://platform.ankra.app/org/applications/{application_id}/auto-merge-setup-pull-requests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true
}
'{
"enabled": true,
"organisation_enabled": true,
"effective": true
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
true or false is the application's own answer; null follows the organisation.
Response
Successful Response
An application's setup pull request auto-merge setting: its own answer, its organisation's, and the effective one the merge acts on.
The application's own answer; null when it follows its organisation. A stored value that is not a boolean reads as false.
The organisation's auto_merge_setup_pull_requests.
Whether Ankra may merge this application's setup pull requests: on only when enabled is true, or when enabled is null and organisation_enabled is true.