Open chalenge opened 3 years ago
See the discussion on #44 to know about why this isn't properly supported. (TLDR: Bitbucket's API Specification: https://api.bitbucket.org/swagger.json is incorrect)
With that said, here's a dirty hack that you can do to make this work. (requires: v2.4.2+
)
// @ts-ignore
bitbucket.repositories.listPullRequests = bitbucket.repositories.listPullRequests.defaults(
{
request: {
validate: {
state: {
enum: undefined,
type: 'array',
items: {
enum: ['OPEN', 'DECLINED', 'MERGED', 'SUPERSEDED'],
type: 'string',
},
},
},
},
}
)
bitbucket.repositories.listPullRequests({
workspace: '<workspace>',
repo_slug: '<repo_slug>',
// @ts-ignore
state: ['OPEN', 'DECLINED'],
})
The state parameter in pullrequests - list can be repeated such as /repositories/{workspace}/{repo_slug}/pullrequests?state=MERGED&state=OPEN
Is there a way this can be supported using in the client. Currently only specifying one parameter is supported