Skip to content
This repository has been archived by the owner on Jun 9, 2021. It is now read-only.

Cannot delete Buttons or Notifications #130

Closed
jefft opened this issue Jul 6, 2016 · 1 comment
Closed

Cannot delete Buttons or Notifications #130

jefft opened this issue Jul 6, 2016 · 1 comment
Labels

Comments

@jefft
Copy link

jefft commented Jul 6, 2016

Hi,

I'm using v2.26 on Bitbucket 4.7.1.

I can successfully create and modify Buttons and Notifications on a test repository, but cannot delete them. The HTTP DELETE request is getting a 404. There are no error logs from Bitbucket.

I think the problem is that the URL being DELETE'ed is wrong. This is the correct REST endpoint for a button, as observed by watching HTTP traffic when updating a button:

https://example.com/rest/prnfb-admin/1.0/settings/buttons/a3775b44-f67b-412e-a9f7-5b194b2390ee

It gives me JSON back:

{"name":"Test New Push Request","projectKey":"TST","repositorySlug":"testrepo","userLevel":"SYSTEM_ADMIN","uuid":"a3775b44-f67b-412e-a9f7-5b194b2390ee"}

But when I try to delete it, the plugin issues a DELETE request for URL:

https://example.com/rest/prnfb-admin/1.0/settings/buttons/projectKey/TST/repositorySlug/testrepo/35164dfc-8f38-4c6b-83e1-3f96d30037c0

which gives me a 404. If I use Chrome's handy 'copy as cURL' functionality and add '-X DELETE', I can successfully delete a button with:

curl -X DELETE 'https://example.com/rest/prnfb-admin/1.0/settings/buttons/a3775b44-f67b-412e-a9f7-5b194b2390ee' -H 'accept-encoding: gzip, deflate, sdch, br' -H 'accept-language: en-GB,en-US;q=0.8,en;q=0.6' -H 'upgrade-insecure-requests: 1' -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36' -H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8' -H 'cache-control: max-age=0' -H 'authority: example.com' -H 'cookie: _atl_bitbucket_remember_me=REDACTED; JSESSIONID=REDACTED' --compressed

Speculation: I understand that in the past, the plugin was centrally configured, and only later added per-repository support. It seems that my repository is using centrally-configured REST URLs (note lack of /repositorySlug/testrepo) for creating and updating, but the per-repository REST URL for deleting.

@tomasbjerre
Copy link
Owner

I just released 2.29, it should solve this problem! Open issue again if not.

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

No branches or pull requests

2 participants