Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete Comments Endpoint passes Username in the place of Workspace #1

Closed
AlteaDown opened this issue Jan 31, 2020 · 3 comments
Closed

Comments

@AlteaDown
Copy link

It looks like the endpoint being hit by the DeleteComments call is not hitting the workspace (404 is returned). Looking at the BitBucket Cloud v2 api, the delete comment endpoint is here: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/pullrequests/%7Bpull_request_id%7D/comments/%7Bcomment_id%7D#delete

In that it says the endpoint is /2.0/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}

However, in this project's code it is declared (as used) as the following:

@DELETE
@Path("/{username}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}")

Note that username is being passed in the place of the workspace.

@tomasbjerre
Copy link
Owner

I started out with the swagger.json from: https://api.bitbucket.org/swagger.json

I interpret it as if it is mixing workspace and username. I choose to use the name username everywhere.

What is the full URL giving you 404?
How would you change it?
What would be the value of workspace if not same as username?

tomasbjerre added a commit to tomasbjerre/bitbucket-cloud-java-rest-api that referenced this issue Feb 2, 2020
@tomasbjerre
Copy link
Owner

You are probably right about this! I'm changing it now.

tomasbjerre added a commit to tomasbjerre/bitbucket-cloud-java-rest-api that referenced this issue Feb 2, 2020
tomasbjerre added a commit to tomasbjerre/violation-comments-to-bitbucket-cloud-command-line that referenced this issue Feb 2, 2020
@tomasbjerre
Copy link
Owner

This is now changed and released! Open issue again if not working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants