Webhook payload #469

Closed
opened 2025-11-02 03:24:36 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @axeloz on GitHub (Mar 10, 2017).

  • Gitea version (or commit ref): 1.1.0

Description

I'm using Deployer (https://github.com/REBELinBLUE/deployer) which starts a deployment using Gitea's webhooks when some commits are pushed on the master branch.
It used to work quite fine but something broke lately. Then I realized that the Gitea webhook payload is:

Request URL: https://deploy.xxxx.io/deploy/LJKmBKGVY7YZzOJyHr981wFfm9j0QSdje5LOnXtXdD8j0vzdcInHGaO6YaXU?source=Gitea&url=https://git.xxx..io/agence/maison&branch=master&update_only=true
Request method: POST
Content-Type: application/json
X-Github-Delivery: c3d0f67f-e9c4-4e5e-b03d-af12a6d54c04
X-Github-Event: push
X-Gogs-Delivery: c3d0f67f-e9c4-4e5e-b03d-af12a6d54c04
X-Gogs-Event: push 

I didn't see X-Github-Delivery nor X-Github-Event before today. I think these headers have been added recently to the payload?

The deployer now thinks that the webhook is coming out of Github and is therefore doing some special treatments for Github instead of using the Gitea driver.
The deployer checks the presence of the Gogs* or the Github* or the Gitlab*, ... headers and loads the appropriate driver.

Is there a reason of this?
Thanks

https://github.com/REBELinBLUE/deployer/issues/334

Screenshots

If this issue involves the Web Interface, please include a screenshot

Originally created by @axeloz on GitHub (Mar 10, 2017). - Gitea version (or commit ref): 1.1.0 ## Description I'm using Deployer (https://github.com/REBELinBLUE/deployer) which starts a deployment using Gitea's webhooks when some commits are pushed on the master branch. It used to work quite fine but something broke lately. Then I realized that the Gitea webhook payload is: ``` Request URL: https://deploy.xxxx.io/deploy/LJKmBKGVY7YZzOJyHr981wFfm9j0QSdje5LOnXtXdD8j0vzdcInHGaO6YaXU?source=Gitea&url=https://git.xxx..io/agence/maison&branch=master&update_only=true Request method: POST Content-Type: application/json X-Github-Delivery: c3d0f67f-e9c4-4e5e-b03d-af12a6d54c04 X-Github-Event: push X-Gogs-Delivery: c3d0f67f-e9c4-4e5e-b03d-af12a6d54c04 X-Gogs-Event: push ``` I didn't see `X-Github-Delivery` nor `X-Github-Event` before today. I think these headers have been added recently to the payload? The deployer now thinks that the webhook is coming out of Github and is therefore doing some special treatments for Github instead of using the Gitea driver. The deployer checks the presence of the Gogs* or the Github* or the Gitlab*, ... headers and loads the appropriate driver. Is there a reason of this? Thanks https://github.com/REBELinBLUE/deployer/issues/334 ## Screenshots **If this issue involves the Web Interface, please include a screenshot**
GiteaMirror added the type/question label 2025-11-02 03:24:36 -06:00
Author
Owner

@lunny commented on GitHub (Mar 10, 2017):

see 79ab69fe30

@lunny commented on GitHub (Mar 10, 2017): see 79ab69fe30b9e7779186c1ffde48e5186a0f578d
Author
Owner

@axeloz commented on GitHub (Mar 10, 2017):

I see. Makes something work but breaks something else :-)
Is there any solution here?

@axeloz commented on GitHub (Mar 10, 2017): I see. Makes something work but breaks something else :-) Is there any solution here?
Author
Owner

@lunny commented on GitHub (Mar 10, 2017):

You can adjust your check sequence, if you check X-Gogs-Delivery before X-GitHub-Delivery, it should be OK.

@lunny commented on GitHub (Mar 10, 2017): You can adjust your check sequence, if you check `X-Gogs-Delivery` before `X-GitHub-Delivery`, it should be OK.
Author
Owner

@axeloz commented on GitHub (Mar 10, 2017):

Yes, it should be OK, but this is not very clean code. Thanks anyways

@axeloz commented on GitHub (Mar 10, 2017): Yes, it should be OK, but this is not very clean code. Thanks anyways
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#469