Drone calling wrong URL on gitea tag create hook

The webhook when creating a tag always returns 404, I’m using drone 0.7.

Note: yes, my x-forwarded-things are OK since a push works perfectly, here is the create for tags which doesn’t works.

According to some issues I found (http://discuss.harness.io/t/drone-0-5-817-gitea-a-gogs-fork-tag-webhook-404/105/5, https://github.com/drone/drone/issues/1870 then https://github.com/go-gitea/gitea/issues/426), drone is likely using the wrong url to get the .drone.yml file for tag push.

I can manually access to “https://mygitea/api/v1/repos/dashie/somerepository/raw/v0.4.2/.drone.yml” without the extras “refs/tag”, with refs/tags it will fails.

But in the log from the nginx serving gitea:
GET /api/v1/repos/dashie/somerepository/raw//.drone.yml HTTP/1.1" 404 3544 "-" "Go-http-client/1.1

This is an URL called by drone, and the tag is missing “/raw//.drone.yml”

Is that a new bug or incompatibility with the/my current gitea (1.2.0+rc2) webhook ?

For reference, the payload my gitea is pushing:

  "secret": "blah====",
  "sha": "b2fb92d248b4ceb8e23817c7ecd23d4c1bbb3e49",
  "ref": "v0.4.2",
  "ref_type": "tag",
  "repository": {
    "id": 69,
    "owner": {
      "id": 1,
      "login": "dashie",
      "full_name": "x",
      "email": "x",
      "avatar_url": "x",
      "username": "dashie"
    "name": "somerepository",
    "full_name": "dashie/somerepository",
    "description": "x.",
    "empty": false,
    "private": false,
    "fork": false,
    "parent": null,
    "mirror": false,
    "size": 26600,
    "html_url": "http://mygitea/dashie/somerepository",
    "ssh_url": "gogs@mygitea:dashie/somerepository.git",
    "clone_url": "http://mygitea/dashie/somerepository.git",
    "website": "https://mygitea/",
    "stars_count": 0,
    "forks_count": 1,
    "watchers_count": 1,
    "open_issues_count": 0,
    "default_branch": "master",
    "created_at": "2017-05-05T11:00:49+02:00",
    "updated_at": "2017-10-18T09:39:09+02:00",
    "permissions": {
      "admin": false,
      "push": false,
      "pull": false
  "sender": {
    "id": 1,
    "login": "dashie",
    "full_name": "x",
    "email": "x",
    "avatar_url": "x",
    "username": "dashie"

Is that a new bug or incompatibility with the/my current gitea (1.2.0+rc2) webhook ?

Maybe, gitea has made a number of breaking changes, including a breaking change to authorization that prevent cloning repositories [1]. Or it could be an issue with the drone gitea driver which is relatively immature. I use drone with gogs and do not have any issues, fwiw.

I would recommend sending a patch to either drone or gitea you are experiencing issues. The gitea integration is community maintained and not something that I personally support.

[1] https://github.com/drone/drone/pull/2241

But as stated, a push event works perfectly, drone can clone and do it job without issue on a push event.

And as the log extract tells me, it’s not a clone issue but a missing thing in an URL drone is creating and calling.

I would recommend submitting a patch in this case.