Skip to content

trigger mismatch with gitea #280

@ruliezz

Description

@ruliezz

Hi All,

I get a mismatch with Gitea ( fork for Gogs ). The error that I got is:
[webhook] 2018/11/16 14:00:54 [03205e] simple-pull got matched, but didn't get triggered because the trigger rules were not satisfied

My hook.json:

[
  {
    "id": "simple-pull",
    "execute-command": "/root/pull.sh",
    "command-working-directory": "/root",
    "pass-arguments-to-command":
    [
      {
        "source": "payload",
        "name": "head_commit.id"
      },
      {
        "source": "payload",
        "name": "pusher.name"
      },
      {
        "source": "payload",
        "name": "pusher.email"
      }
    ],
    "trigger-rule":
    {
      "and":
      [
        {
          "match":
          {
            "type": "payload-hash-sha256",
            "secret": "mysecret",
            "parameter":
            {
              "source": "header",
              "name": "X-Gogs-Signature"
            }
          }
        },
        {
          "match":
          {
            "type": "value",
            "value": "refs/heads/master",
            "parameter":
            {
              "source": "payload",
              "name": "ref"
            }
          }
        }
      ]
    }
  }
]

In gitea webhook is this the output:

Request Headers:

Request URL: https://0.0.0.0:9000/hooks/simple-pull
Request method: POST
Content-Type: application/json
X-GitHub-Delivery: 2e44a307-6443-4acd-8842-a853cd34de48
X-GitHub-Event: push
X-Gitea-Delivery: 2e44a307-6443-4acd-8842-a853cd34de48
X-Gitea-Event: push
X-Gogs-Delivery: 2e44a307-6443-4acd-8842-a853cd34de48
X-Gogs-Event: push

Response Headers

Content-Length: 30
Content-Type: text/plain; charset=utf-8
Date: Fri, 16 Nov 2018 13:00:54 GMT

Body
Hook rules were not satisfied.

I do not understand why the tiggers not mach.
It this good for Gitea?
"name": "X-Gogs-Signature"
And is this the right type?
"type": "payload-hash-sha256",

Examples that I have used: https://github.com/adnanh/webhook/blob/master/docs/Hook-Examples.md

Any toughs?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions