Cannot find repository

Upon adding, activating the repo in drone the webhook is properly created on Bit Bucket Cloud. However when I push repo with .drone.yml I see drone catching the webhook but throws an error

11/11/2018 23:30:17{“level”:“error”,“ip”:“10…”,“path”:"/hook?secret=4GFgmlIrth8eXEpw…",“method”:“POST”,“request_id”:“bfkaqua8ukuqurr2bce0”,“error”:“sql: no rows in result set”,“namespace”:“fwt-hq”,“name”:“API V1”,“time”:“2018-11-11T22:30:17Z”,“message”:“cannot find repository”}

11/11/2018 23:30:17{“level”:“error”,“ip”:“10…”,“path”:"/hook?secret=4GFgmlIrth8eXEpw…",“method”:“POST”,“request_id”:“bfkaqua8ukuqurr2bce0”,“error”:“Cannot find repository”,“time”:“2018-11-11T22:30:17Z”,“message”:“cannot parse webhook”}

It looks like the name does not match … the UI has api-v1 and the webhook has API V1. Can you please provide a copy of the webhook payload by passing DRONE_DEBUG_DUMP_HOOK=true to the server. This will dump the full webhook payload to the Drone logs (you will want to remove this setting once troubleshooting is complete).

You may find the log here

Please do check gitter for the code

ok, I found the root cause. There are two different names in the payload (a display name, and a full_name). We were using the display name when parsing webhooks when we should have been using the full_name (slug).

I issue a patch to our upstream library that handles webhook parsing:

I will need to push an updated version of Drone, which I can do later this evening.

That was my question before, where I wasn’t clear enough in explaining it. That would be perfect. Thank you for all the help @bradrydzewski! Much appreciated!

That is the same I described here:

@rockoo this should be fixed for Bitbucket (get the new rc.1 snapshot). I have not personally test this outside of unit tests, so please let me know if you hit any issues.

@boredland I think I see where this issue is occurring in GitLab and will try to issue a patch tomorrow. I will post back to the issue once available for testing.

@bradrydzewski It works now! I will keep you posted if I find any additional issues. Thank you for all the help!