Returns a page of required build merge checks that have been configured for this repository.
The authenticated user must have REPO_READ permission for the target repository to request a page of required build merge checks.
string
Requiredstring
Requirednumber
number
The required build merge checks associated with the provided repository.
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/required-builds/latest/projects/{projectKey}/repos/{repositorySlug}/conditions' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{
"values": [
{
"buildParentKeys": [
"build-key-1",
"build-key-2"
],
"refMatcher": {
"displayId": "main",
"id": "refs/heads/main",
"type": {
"name": "Branch",
"id": "ANY_REF"
}
},
"exemptRefMatcher": {
"displayId": "main",
"id": "refs/heads/main",
"type": {
"name": "Branch",
"id": "ANY_REF"
}
},
"id": 15
}
],
"size": 1,
"isLastPage": true,
"nextPageStart": 2154,
"start": 2154,
"limit": 25
}
Update the required builds merge check for the given ID.
The authenticated user must have REPO_ADMIN permission for the target repository to update a required build merge check.
The contents of the required build merge check request are:
These fields are required:
These fields are optional:
string
Requiredinteger
Requiredstring
RequiredThe request specifying the required build parent keys, ref matcher and exemption matcher
array<string>
RequiredRestRefMatcher
object
RequiredThe details needed to update a required build merge check.
1
2
3
curl --request PUT \
--url 'http://{baseurl}/rest/required-builds/latest/projects/{projectKey}/repos/{repositorySlug}/condition/{id}' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{
"buildParentKeys": [
"build-key-1",
"build-key-2"
],
"refMatcher": {
"displayId": "main",
"id": "refs/heads/main",
"type": {
"name": "Branch",
"id": "ANY_REF"
}
},
"exemptRefMatcher": {
"displayId": "main",
"id": "refs/heads/main",
"type": {
"name": "Branch",
"id": "ANY_REF"
}
},
"id": 15
}
Deletes a required build existing merge check, given it's ID.
The authenticated user must have REPO_ADMIN permission for the target repository to delete a required build merge check.
string
Requiredinteger
Requiredstring
RequiredAn empty response indicating the merge check was successfully deleted, or was never present.
1
2
curl --request DELETE \
--url 'http://{baseurl}/rest/required-builds/latest/projects/{projectKey}/repos/{repositorySlug}/condition/{id}'
Create a required build merge check for the given repository.
The authenticated user must have REPO_ADMIN permission for the target repository to register a required build merge check.
The contents of the required build merge check request are:
These fields are required:
These fields are optional:
string
Requiredstring
RequiredThe request specifying the required build parent keys, ref matcher and exemption matcher
array<string>
RequiredRestRefMatcher
object
RequiredA response containing the newly created required build merge check.
1
2
3
curl --request POST \
--url 'http://{baseurl}/rest/required-builds/latest/projects/{projectKey}/repos/{repositorySlug}/condition' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{
"buildParentKeys": [
"build-key-1",
"build-key-2"
],
"refMatcher": {
"displayId": "main",
"id": "refs/heads/main",
"type": {
"name": "Branch",
"id": "ANY_REF"
}
},
"exemptRefMatcher": {
"displayId": "main",
"id": "refs/heads/main",
"type": {
"name": "Branch",
"id": "ANY_REF"
}
},
"id": 15
}
Rate this page: