Open sbgamma opened 5 months ago
To clarify, the Bitbucket API is interpreting the / as part of the commit hash. Sample response shown below:
{
"type": "error",
"error": {
"message": "Commit not found",
"data": {
"shas": [
"05XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX03/"
]
}
},
"data": {
"shas": [
"05XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX03/"
]
}
}
https://github.com/atlassian-api/atlassian-python-api/blob/ac0e1fe3fa612941a383e51ab527d95236108232/atlassian/bitbucket/cloud/repositories/commits.py#L37-L38
A trailing slash is always added to the URL in requests for this endpoint.
If the "top" param is set, then the resulting URL will be https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/commits/{commit}/. This results in a 404.
I'll raise a PR to fix this.