Merge queues help keep a branch healthy by merging pull requests in order, only after each one has been validated with Bitbucket Pipelines against the latest state of the branch. When a pull request targeting a branch with an active merge queue is merged, it is added to the queue instead of being merged immediately. The merge queues resource lets you list the merge queues configured for a repository, inspect the pull requests currently in a queue, and remove a pull request from a queue.
Lists merge queues configured for a repository. Optionally filter by branch.
repositoryread:repository:bitbucketstring
Requiredstring
Requiredstring
integer
integer
Merge queues retrieved successfully.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/merge-queues' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'1
2
3
4
5
6
7
8
9
10
11
12
13
{
"page": 2154,
"size": 2154,
"pagelen": 2154,
"values": [
{
"type": "<string>",
"uuid": "<string>",
"name": "<string>",
"state": "<string>"
}
]
}Gets a merge queue by UUID.
repositoryread:repository:bitbucketstring
Requiredstring
Requiredstring
RequiredMerge queue retrieved successfully.
allOf [object, Merge Queue]
Base type for most resource objects. It defines the common type element that identifies an object's type. It also identifies the element as Swagger's discriminator.
Identity and state of the merge queue configured for the destination branch.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/merge-queues/{merge_queue_uuid}' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'1
2
3
4
5
6
{
"type": "<string>",
"uuid": "<string>",
"name": "<string>",
"state": "<string>"
}Lists pullrequests currently associated with a merge queue.
pullrequestread:pullrequest:bitbucketstring
Requiredstring
Requiredstring
Requiredinteger
integer
Merge queue pullrequests retrieved successfully.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/merge-queues/{merge_queue_uuid}/queue' \
--header 'Authorization: Bearer <access_token>' \
--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
{
"page": 2154,
"size": 2154,
"pagelen": 2154,
"values": [
{
"type": "queued_pullrequest",
"status": "QUEUED",
"rank": 61,
"queued_on": "<string>",
"last_activity_on": "<string>",
"merge_queue": {
"type": "merge_queue",
"uuid": "<string>"
},
"pipeline": {
"type": "<string>"
},
"pullrequest": {
"type": "<string>"
}
}
]
}Gets a specific pullrequest in a merge queue.
pullrequestread:pullrequest:bitbucketstring
Requiredstring
Requiredstring
Requiredinteger
RequiredMerge queue pullrequest retrieved successfully.
The pullrequest object in a merge queue.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/merge-queues/{merge_queue_uuid}/queue/{pullrequest_id}' \
--header 'Authorization: Bearer <access_token>' \
--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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
{
"type": "queued_pullrequest",
"status": "QUEUED",
"rank": 61,
"queued_on": "<string>",
"last_activity_on": "<string>",
"merge_queue": {
"type": "merge_queue",
"uuid": "<string>"
},
"pipeline": {
"type": "<string>",
"uuid": "<string>",
"build_number": 33,
"creator": {
"type": "<string>"
},
"repository": {
"type": "<string>"
},
"target": {
"type": "<string>"
},
"trigger": {
"type": "<string>"
},
"state": {
"type": "<string>"
},
"variables": [
{
"type": "<string>"
}
],
"created_on": "<string>",
"completed_on": "<string>",
"build_seconds_used": 50,
"configuration_sources": [
{
"source": "<string>",
"uri": "<string>"
}
],
"links": {
"type": "<string>"
}
},
"pullrequest": {
"type": "<string>",
"links": {
"self": {
"href": "<string>",
"name": "<string>"
},
"html": {
"href": "<string>",
"name": "<string>"
},
"commits": {
"href": "<string>",
"name": "<string>"
},
"approve": {
"href": "<string>",
"name": "<string>"
},
"diff": {
"href": "<string>",
"name": "<string>"
},
"diffstat": {
"href": "<string>",
"name": "<string>"
},
"comments": {
"href": "<string>",
"name": "<string>"
},
"activity": {
"href": "<string>",
"name": "<string>"
},
"merge": {
"href": "<string>",
"name": "<string>"
},
"decline": {
"href": "<string>",
"name": "<string>"
},
"mergeability_checks": {
"href": "<string>",
"name": "<string>"
}
},
"id": 108,
"title": "<string>",
"rendered": {
"title": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"description": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"reason": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
}
},
"summary": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"state": "OPEN",
"author": {
"type": "<string>"
},
"source": {},
"destination": {},
"merge_commit": {
"hash": "<string>"
},
"comment_count": 51,
"task_count": 53,
"close_source_branch": true,
"closed_by": {
"type": "<string>"
},
"reason": "<string>",
"created_on": "<string>",
"updated_on": "<string>",
"reviewers": [
{
"type": "<string>"
}
],
"participants": [
{
"type": "<string>"
}
],
"draft": true,
"queued": true
}
}Removes a pullrequest from the specified merge queue asynchronously.
pullrequest:writewrite:pullrequest:bitbucketstring
Requiredstring
Requiredstring
Requiredinteger
RequiredThe remove request was accepted.
1
2
3
curl --request DELETE \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/merge-queues/{merge_queue_uuid}/queue/{pullrequest_id}' \
--header 'Authorization: Bearer <access_token>'Rate this page: