Runtime error: index out of range when try to make a release from Gitea

Hello everyone,

I am trying to make a release build using Gitea. Here is the steps:

  1. I opened target repository in Gitea
  2. Click on Realease
  3. Click on New Release
  4. Fill all field
  5. Click Publish release

and the build does not start. When I check when hooks its execution is red. Here it is the payload:
{
“secret”: “GF5Z5EA2U4I6DXFKV7S4SNAMYKT7SIXXLJVAHH3DW2E44EE5AWIA====”,
“ref”: “refs/tags/Testtset”,
“before”: “0000000000000000000000000000000000000000”,
“after”: “163e9b594477b17b53e832e1bfea10b6e394584b”,
“compare_url”: “”,
“commits”: [],
“repository”: {
“id”: 1,
“owner”: {
“id”: 2,
“login”: “trakia”,
“full_name”: “Trakia Cable Ltd”,
“email”: “”,
“avatar_url”: “”,
“username”: “trakia”
},
“name”: “internet-manager”,
“full_name”: “trakia/internet-manager”,
“description”: “”,
“empty”: false,
“private”: true,
“fork”: false,
“parent”: null,
“mirror”: false,
“size”: 2188,
“html_url”: “”,
“ssh_url”: “”,
“clone_url”: “”,
“website”: “”,
“stars_count”: 0,
“forks_count”: 0,
“watchers_count”: 2,
“open_issues_count”: 0,
“default_branch”: “master”,
“created_at”: “2018-01-05T14:16:54Z”,
“updated_at”: “2018-01-22T20:15:36Z”,
“permissions”: {
“admin”: false,
“push”: false,
“pull”: false
}
},
“pusher”: {
“id”: 1,
“login”: “tsvgos”,
“full_name”: “”,
“email”: "[email protected]",
“avatar_url”: “”,
“username”: “tsvgos”
},
“sender”: {
“id”: 1,
“login”: “tsvgos”,
“full_name”: “”,
“email”: "[email protected]",
“avatar_url”: “”,
“username”: “tsvgos”
}
}
and header:
Request URL: <removed (1)>
Request method: POST
Content-Type: application/json
X-Gitea-Delivery: a3701a8a-7f60-4285-9b73-4cfff24a6656
X-Gitea-Event: push
X-Github-Delivery: a3701a8a-7f60-4285-9b73-4cfff24a6656
X-Github-Event: push
X-Gogs-Delivery: a3701a8a-7f60-4285-9b73-4cfff24a6656
X-Gogs-Event: push

Then I check the Drone server logs. Here is the log entry:
2018/01/22 20:15:37 [Recovery] panic recovered:
POST <remove same as (1)> HTTP/1.1
Host: drone.trakia.lan
Accept-Encoding: gzip
Content-Length: 1736
Content-Type: application/json
User-Agent: GogsServer
X-Gitea-Delivery: a3701a8a-7f60-4285-9b73-4cfff24a6656
X-Gitea-Event: push
X-Github-Delivery: a3701a8a-7f60-4285-9b73-4cfff24a6656
X-Github-Event: push
X-Gogs-Delivery: a3701a8a-7f60-4285-9b73-4cfff24a6656
X-Gogs-Event: push

runtime error: index out of range
/usr/local/go/src/runtime/panic.go:489 (0x430c7f)
/usr/local/go/src/runtime/panic.go:28 (0x42f8fe)
/go/src/github.com/drone/drone/remote/gitea/helper.go:77 (0x9f0839)
/go/src/github.com/drone/drone/remote/gitea/parse.go:58 (0x9f1f2b)
/go/src/github.com/drone/drone/remote/gitea/parse.go:30 (0x9f1d81)
/go/src/github.com/drone/drone/remote/gitea/gitea.go:321 (0x9efdeb)
/go/src/github.com/drone/drone/server/hook.go:58 (0x912a64)
/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 (0x86850a)
/go/src/github.com/drone/drone/router/middleware/token/token.go:17 (0x881b10)
/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 (0x86850a)
/go/src/github.com/drone/drone/router/middleware/session/user.go:68 (0x880fb2)
/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 (0x86850a)
/go/src/github.com/drone/drone/router/middleware/store.go:15 (0x980727)
/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 (0x86850a)
/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/contrib/ginrus/ginrus.go:26 (0x980b7f)
/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 (0x86850a)
/go/src/github.com/drone/drone/router/middleware/header/header.go:25 (0x878b30)
/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 (0x86850a)
/go/src/github.com/drone/drone/router/middleware/header/header.go:17 (0x878ad9)
/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 (0x86850a)
/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/recovery.go:45 (0x87679a)
/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/context.go:97 (0x86850a)
/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/gin.go:284 (0x86e340)
/go/src/github.com/drone/drone/vendor/github.com/gin-gonic/gin/gin.go:265 (0x86dc5b)
/usr/local/go/src/net/http/server.go:2568 (0x6cc7f2)
/usr/local/go/src/net/http/server.go:1825 (0x6c8992)
/usr/local/go/src/runtime/asm_amd64.s:2197 (0x45f881)

PS: Some urls are remove because of new users’ restrictions.

Best regards,
Tsvetomir Gospodinov

The Gitea implementation is experimental and community maintained. Please consider patching and sending a pull request if you come across any bugs or issues.