We have started to facing this issue after the repository got renamed.
For example I have tried to restart a previous PR (without this issue) when the repo had its original name yet, but then I got the same issue described here.
We have tried to re-sync the repos (close / re-open the PR) again but It doesn’t help so much.
this error would indicate that when git tries to clone the pull request, the Bitbucket server is responding that the pull request reference does not exist. If Bitbucket server is returning an error when git is trying to clone a reference, you may need to check your Bitbucket server logs or contact Atlassian support for more details.
Strange we don’t see related issues on logs but after restart the build and close/re-open few times the same PR, It works.
Curious, because the PR ref url https://ci.my-company.com/link/SER/app-server/tree/refs/pull-requests/28/from now redirects to corresponding PR ref but it was not found in the past.
I’ll reiterate here that Bitbucket Server’s pull request refs are not API , and have never been considered API, so the way they work is dangerous to rely on
It looks like there is a workaround. We would need to make an API call to generate the diff which in turn would ensure the pull-request references are created.
Yes, we will unfortunately have to develop a workaround in Drone. We could otherwise be waiting for years for Atlassian support to resolve this matter …
Hey @bradrydzewski thanks for the hint!
We have tested the Java plug-in internally and works as intended. I have also reproduced the same behavior explained above, but without issues this time.
Drone is now able to get those PR references back again.
It was a matter of just upload the .jar file only.
Awesome! However, as a workaround is more than fine for but I don’t know if also Drone can consider to include this workaround as well. Because a PR event on Drone pipelines is a common feature that I think should work out of the box.
Yes, we still plan on implementing the fix / workaround and have an issue in our tracker [1] that can be subscribed to. The java plugin should be used as a temporary fix for now.