Drone 1.0.0-rc.3 gogs webhook response body is null

request headers

Request URL: http://drone.haitanyule.com/hook
Request method: POST
Content-Type: application/json
X-Github-Delivery: 18c12410-850e-4277-9228-5056a99336b2
X-Github-Event: push
X-Gogs-Delivery: 18c12410-850e-4277-9228-5056a99336b2
X-Gogs-Event: push
X-Gogs-Signature: d0a82431b19adef415b86238e05079cfd35c4eed68a8a001bd58b496a4885957

request body

{
  "ref": "refs/heads/master",
  "before": "d2be696ee5b307160367032c2eb9906a83a8f9f5",
  "after": "d2be696ee5b307160367032c2eb9906a83a8f9f5",
  "compare_url": "",
  "commits": [
    {
      "id": "d2be696ee5b307160367032c2eb9906a83a8f9f5",
      "message": "测试代码\n",
      "url": "http://git.haitanyule.com/docker/html/commit/d2be696ee5b307160367032c2eb9906a83a8f9f5",
      "author": {
        "name": "v7lin",
        "email": "[email protected]",
        "username": "v7lin"
      },
      "committer": {
        "name": "v7lin",
        "email": "[email protected]",
        "username": "v7lin"
      },
      "added": [],
      "removed": [],
      "modified": [
        "docker-compose.yml"
      ],
      "timestamp": "0001-01-01T00:00:00Z"
    }
  ],
  "repository": {
    "id": 37,
    "owner": {
      "id": 3,
      "username": "docker",
      "login": "docker",
      "full_name": "",
      "email": "",
      "avatar_url": "http://git.haitanyule.com/avatars/3"
    },
    "name": "html",
    "full_name": "docker/html",
    "description": "海坛渔乐",
    "private": true,
    "fork": false,
    "parent": null,
    "empty": false,
    "mirror": false,
    "size": 335872,
    "html_url": "http://git.haitanyule.com/docker/html",
    "ssh_url": "[email protected]:docker/html.git",
    "clone_url": "http://git.haitanyule.com/docker/html.git",
    "website": "http://www.haitanyule.com/",
    "stars_count": 0,
    "forks_count": 0,
    "watchers_count": 2,
    "open_issues_count": 0,
    "default_branch": "master",
    "created_at": "2018-11-02T15:52:46+08:00",
    "updated_at": "2018-12-27T22:04:00+08:00"
  },
  "pusher": {
    "id": 1,
    "username": "v7lin",
    "login": "v7lin",
    "full_name": "",
    "email": "[email protected]",
    "avatar_url": "http://git.haitanyule.com/avatars/1"
  },
  "sender": {
    "id": 1,
    "username": "v7lin",
    "login": "v7lin",
    "full_name": "",
    "email": "[email protected]",
    "avatar_url": "http://git.haitanyule.com/avatars/1"
  }
}

response headers

Cache-Control: no-cache, no-store, must-revalidate, private, max-age=0
Content-Length: 5
Content-Type: application/json
Date: Thu, 27 Dec 2018 14:23:35 GMT
Expires: Thu, 01 Jan 1970 00:00:00 UTC
Pragma: no-cache
X-Accel-Expires: 0
X-Frame-Options: DENY
X-Xss-Protection: 1; mode=block

response body

null

a null body is returned if the webhook is ignored or skipped

why? it’s first push.

why was it skipped? I have not been provided with enough information to answer that question. Was there something in the yaml that instructed Drone to skip the commit? Did you check your server logs? Drone usually writes the skip reason to the logs.

thanks … i found the reason