Open wwang-noggin opened 3 years ago
Bitbucket's API is not consistent. According to the docs: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/deployments/#get
paginated response should support sort
. But it's possible that they don't really support it.
Does it work if you directly call the API: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/deployments/#get ?
The sort
param (nor q
) is not supported in List Deployments call, per https://api.bitbucket.org/swagger.json
According to https://bitbucketjs.netlify.app/#api-repositories-repositories_listDeployments, there is a "sort" parameter. We have tested it with by calling listDeployments({ repo_slug:"repo..", workspace:"workspace", page:1, pagelen:10, sort:"last_update_time"}), the return error is: "Bad Request".
Removing the sort: "last_update_time", it works.
Node version: 14.16.0