Good morning, I am having a very strange error, because when using the api https://api.bitbucket.org/2.0/repositories/${workspace}/${this.repoSlug}/pullrequests/${pullRequestsId}/diffstat in my local in a library works correctly and returns me that I have deleted lines so you can not merge the pull request. Now in bitbucket when running the same script to check for deleted lines that api I mentioned above returns 404 with the same credentials, same pull request id and same repository.
Hello @fernando_biagetti and welcome to the Community!
The error 404 usually indicates that the URL is incorrect or that the credentials you are using don't have access to a given resource.
I would suggest trying to test doing a request to that endpoint without using the library, but calling it directly using curl, as in the following example :
curl -X GET -v -u USERNAME:APP_PASSWORD https://api.bitbucket.org/2.0/repositories/{workspace}/{repository}/pullrequests/{Pull request number}/diffstat
You can test this request in your local machine, and once it works locally, include the same command in your pipeline using the same credentials, and verify if the error persists.
If the curl command succeeds on the pipeline as well, it may be the case that the library is configured to use the wrong set of credentials.
Thank you, @fernando_biagetti !
Patrik S
<redacted> The strange thing is that it only happens in the bitbucket pipe, in my pc this error does not happen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.