Bitbucket pull request: Repository not found
Hello!
My team has been using the Code Collaborator Bitbucket Cloud integration for a couple months. We upgraded from Code Collaborator v11.0 to v11.1 today and now have problems getting pull requests to show up in Collaborator.
The BitBucket webhooks page shows a successful "pullrequest:created" event but the collab.log contains this error:
404: Repository KYN/kyn-server not found
2017-08-29 17:53:13,008 ERROR http-nio-8443-exec-4 com.smartbear.ccollab.datamodel.remotesystem.PrRemoteSystemProcessor - https://api.bitbucket.org/2.0/repositories/KYN/kyn-server/pullrequests/29/commits 404: Repository KYN/kyn-server not found com.smartbear.ccollab.datamodel.remotesystem.bitbucket.BitbucketApiException: https://api.bitbucket.org/2.0/repositories/KYN/kyn-server/pullrequests/29/commits 404: Repository KYN/kyn-server not found at com.smartbear.ccollab.datamodel.remotesystem.bitbucket.saas.BitbucketSaasApiClient.makeCall(BitbucketSaasApiClient.java:152) at com.smartbear.ccollab.datamodel.remotesystem.bitbucket.saas.BitbucketSaasApiClient.toList(BitbucketSaasApiClient.java:118) at com.smartbear.ccollab.datamodel.remotesystem.bitbucket.saas.BitbucketSaasApi.getPullRequestCommits(BitbucketSaasApi.java:134) at com.smartbear.ccollab.datamodel.remotesystem.bitbucket.saas.BitbucketSaasProcessor.getPullRequestCommits(BitbucketSaasProcessor.java:55) at com.smartbear.ccollab.datamodel.remotesystem.PrRemoteSystemProcessor.processPullRequestCreate(PrRemoteSystemProcessor.java:160) at com.smartbear.ccollab.BitbucketWebhooksEndpoint.doPost(BitbucketWebhooksEndpoint.java:71) at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
It seems something is wrong with the URL that is being constructed by collaborator. I tried testing from command line to see if I could reproduce and I can:
curl --user username:app_password https://api.bitbucket.org/2.0/repositories/KYN/kyn-server/pullrequests/36/commits {"type": "error", "error": {"message": "Repository KYN/kyn-server not found"}}
If I change "KYN" in the URL (which appears to be a BitBucket project name) to my Bitbucket Team ID ("TEAM"), then the call succeeds:
curl --user username:password https://api.bitbucket.org/2.0/repositories/TEAM/kyn-server/pullrequests/36/commits {"pagelen": 10, "size": 15, "values": [{"hash": "25a0646107c5d95ff09b3eaa0cbf9a81a966a28f", "repository": {"links": ...
What is the solution? I have already tried deleting and recreating the remote system configuration in collaborator without success.
Thanks.