nishio-dens / bitbucket-pullrequest-builder-plugin

Bitbucket Pull Request Builder Plugin for Jenkins
Other
125 stars 145 forks source link

Reg : REST API endpoint to v2 #199

Open rajasilambu opened 5 years ago

rajasilambu commented 5 years ago

I am currently having bitbuckrt-pullrequest-builder-plugin V 1.4.30. The plugin is currently calling REST API version 1.0. Is there any configuration which I can change to make the plugins call REST API 2.0.

This issue was discussed in #160 as well , but it is not mentioned whether the configuration change has been done or not.

rajasilambu commented 5 years ago

@nishio-dens the latest version of the plugin (V 1.4.30) is pointing to REST API 1.0. I tried using the older version (V 1.4.28) & it is calling API 2.0 . Please make the changes in the latest version of the plugin as well.

CodeMonk commented 5 years ago

The only portion of the pullrequest builder that speaks v1.0 is the STASH implementation.

Please let me know if you're using stash, or what v1 endpoint is being used.

rajasilambu commented 5 years ago

The only portion of the pullrequest builder that speaks v1.0 is the STASH implementation.

Please let me know if you're using stash, or what v1 endpoint is being used.

Screenshot 2019-05-01 at 09 23 49

This is the configuration that I have done from my end with v 1.4.28(the plugin is working as expected). I am not sure whether I have used any STASH or not. please let me know how to check it or share a link where I can have more understanding about stash.

CodeMonk commented 5 years ago

You have obscured the only field that would let me know.

If you are using stash, then your url will not contain bitbucket.org. If you are using cloud, your url WILL contain bitbucket.org

However, the second part of my question was more important: Why do you think that v1 endpoints are being used?

rajasilambu commented 5 years ago

You have obscured the only field that would let me know.

If you are using stash, then your url will not contain bitbucket.org. If you are using cloud, your url WILL contain bitbucket.org

However, the second part of my question was more important: Why do you think that v1 endpoints are being used?

image

Yes , my URL starts " https://rajasilambu@bitbucket.org "

In the logs i could see that URL for which the call is made . PFA the screenshot.

CodeMonk commented 5 years ago

That is strange -- I'll look into it ASAP.

CodeMonk commented 5 years ago

Looking at the stack trace - you are using server. And, afaik, that url shouldn't have a username in it. In fact, you shouldn't be specifying the url in the trigger at all, unless you're using server. Here is my config:

Untitled

CodeMonk commented 5 years ago

Check your Bitbucket URL field - should be empty for bitbucket cloud.