woodpecker: PR on Gitea triggers the CI twice

Component

server

Describe the bug

Two CI runs are triggered at the same time on PR creation, see the two webhook events below.

Request URL: https://ci.rknet.org/api/hook?access_token=***
Request method: POST
Content-Type: application/json
X-GitHub-Delivery: 342485a1-***
X-GitHub-Event: pull_request
X-GitHub-Event-Type: pull_request
X-Gitea-Delivery: 342485a1-***
X-Gitea-Event: pull_request
X-Gitea-Event-Type: pull_request
X-Gitea-Signature: ***
X-Gogs-Delivery: 342485a1-***
X-Gogs-Event: pull_request
X-Gogs-Event-Type: pull_request
X-Gogs-Signature: ***
X-Hub-Signature: sha1=***
X-Hub-Signature-256: sha256=***

## Response 200
{"id":193,"number":33,"author":"renovator","parent":0,"event":"pull_request","status":"pending","errors":null,"enqueued_at":1701175158,"created_at":1701175158,"updated_at":1701175158,"started_at":0,"finished_at":0,"deploy_to":"","commit":"c17d6e7f15201d0a253f83890b1d088e9b34c43d","branch":"main","ref":"refs/pull/145/head","refspec":"renovate/docker-digests:main","clone_url":"","title":"chore(docker): update docker.io/clux/muslrust:1.74.0-stable docker digest to 37ba39a","message":"chore(docker): update docker.io/clux/muslrust:1.74.0-stable docker digest to 37ba39a","timestamp":0,"sender":"renovator","author_avatar":"https://gitea.rknet.org/avatars/188565bedb61ddcc66b2dceedd8aa136","author_email":"","forge_url":"https://gitea.rknet.org/container/vaultwarden/pulls/145","reviewed_by":"","reviewed_at":0,"workflows":[{"id":671,"pipeline_id":193,"pid":1,"name":"build-container","state":"pending","children":[{"id":2322,"uuid":"d77cc32e-3a56-41d2-92f5-1772c862ab68","pipeline_id":193,"pid":4,"ppid":1,"name":"clone","state":"pending","exit_code":0,"type":"clone"},{"id":2323,"uuid":"42927df2-9032-4aad-84b0-f1b09b1136cc","pipeline_id":193,"pid":5,"ppid":1,"name":"security-build","state":"pending","exit_code":0,"type":"plugin"},{"id":2324,"uuid":"f3d81d7a-b1dd-4b12-a045-e21b361a9f74","pipeline_id":193,"pid":6,"ppid":1,"name":"security-scan","state":"pending","exit_code":0,"type":"commands"}]},{"id":672,"pipeline_id":193,"pid":2,"name":"build-package","state":"pending","children":[{"id":2325,"uuid":"8eee1203-e26e-45b1-a612-f8840dd19f93","pipeline_id":193,"pid":7,"ppid":2,"name":"clone","state":"pending","exit_code":0,"type":"clone"},{"id":2326,"uuid":"8216ee3f-72ac-43cc-b168-0fb9147f47ff","pipeline_id":193,"pid":8,"ppid":2,"name":"changelog","state":"pending","exit_code":0,"type":"commands"}]},{"id":673,"pipeline_id":193,"pid":3,"name":"docs","state":"pending","children":[{"id":2327,"uuid":"74a6fcf2-853e-4565-82ae-7956b92ee653","pipeline_id":193,"pid":9,"ppid":3,"name":"clone","state":"pending","exit_code":0,"type":"clone"},{"id":2328,"uuid":"81282a99-5e37-47ec-a5da-8c46b8fa0643","pipeline_id":193,"pid":10,"ppid":3,"name":"markdownlint","state":"pending","exit_code":0,"type":"commands"},{"id":2329,"uuid":"b0e42cd5-2c17-4f79-9678-81889699cca7","pipeline_id":193,"pid":11,"ppid":3,"name":"spellcheck","state":"pending","exit_code":0,"type":"commands"},{"id":2330,"uuid":"a8a273bc-de6b-433c-b335-795bb29a8bec","pipeline_id":193,"pid":12,"ppid":3,"name":"link-validation","state":"pending","exit_code":0,"type":"commands"}]}]}
Request URL: https://ci.rknet.org/api/hook?access_token=****
Request method: POST
Content-Type: application/json
X-GitHub-Delivery: 563de175-***
X-GitHub-Event: pull_request
X-GitHub-Event-Type: pull_request_sync
X-Gitea-Delivery: 563de175-***
X-Gitea-Event: pull_request
X-Gitea-Event-Type: pull_request_sync
X-Gitea-Signature: ***
X-Gogs-Delivery: 563de175-***
X-Gogs-Event: pull_request
X-Gogs-Event-Type: pull_request_sync
X-Gogs-Signature: ***
X-Hub-Signature: sha1=***
X-Hub-Signature-256: sha256=***

## Response 200
{"id":194,"number":34,"author":"renovator","parent":0,"event":"pull_request","status":"pending","errors":null,"enqueued_at":1701175159,"created_at":1701175159,"updated_at":1701175159,"started_at":0,"finished_at":0,"deploy_to":"","commit":"c17d6e7f15201d0a253f83890b1d088e9b34c43d","branch":"main","ref":"refs/pull/145/head","refspec":"renovate/docker-digests:main","clone_url":"","title":"chore(docker): update docker.io/clux/muslrust:1.74.0-stable docker digest to 37ba39a","message":"chore(docker): update docker.io/clux/muslrust:1.74.0-stable docker digest to 37ba39a","timestamp":0,"sender":"renovator","author_avatar":"https://gitea.rknet.org/avatars/188565bedb61ddcc66b2dceedd8aa136","author_email":"","forge_url":"https://gitea.rknet.org/container/vaultwarden/pulls/145","reviewed_by":"","reviewed_at":0,"workflows":[{"id":674,"pipeline_id":194,"pid":1,"name":"build-container","state":"pending","children":[{"id":2331,"uuid":"2e55b6e7-e29f-450e-886b-e57f7f98bcbe","pipeline_id":194,"pid":4,"ppid":1,"name":"clone","state":"pending","exit_code":0,"type":"clone"},{"id":2332,"uuid":"419e9fcd-9fdd-4c06-87a7- 15280310afea","pipeline_id":194,"pid":5,"ppid":1,"name":"security-build","state":"pending","exit_code":0,"type":"plugin"},{"id":2333,"uuid":"8a6eb1c5-9e26-4cfa-963d-d487ab532bb0","pipeline_id":194,"pid":6,"ppid":1,"name":"security-scan","state":"pending","exit_code":0,"type":"commands"}]},{"id":675,"pipeline_id":194,"pid":2,"name":"build-package","state":"pending","children":[{"id":2334,"uuid":"2a48dbb4-75be-405f-a4e2-97a85891f66b","pipeline_id":194,"pid":7,"ppid":2,"name":"clone","state":"pending","exit_code":0,"type":"clone"},{"id":2335,"uuid":"54e90fd4-3b5e-4f22-b344-12b3f4caa4b5","pipeline_id":194,"pid":8,"ppid":2,"name":"changelog","state":"pending","exit_code":0,"type":"commands"}]},{"id":676,"pipeline_id":194,"pid":3,"name":"docs","state":"pending","children":[{"id":2336,"uuid":"990901af-c9f9-4347-add5-6d7358f37436","pipeline_id":194,"pid":9,"ppid":3,"name":"clone","state":"pending","exit_code":0,"type":"clone"},{"id":2337,"uuid":"b72998a4-1fc5-492a-a0d7-c8dd7e181e7c","pipeline_id":194,"pid":10,"ppid":3,"name":"markdownlint","state":"pending","exit_code":0,"type":"commands"},{"id":2338,"uuid":"06f2c11a-e255-41f1-a30e-d269a8142d5f","pipeline_id":194,"pid":11,"ppid":3,"name":"spellcheck","state":"pending","exit_code":0,"type":"commands"},{"id":2339,"uuid":"a85323cf-b1c1-4a99-bdaf-224ad6e4e22e","pipeline_id":194,"pid":12,"ppid":3,"name":"link-validation","state":"pending","exit_code":0,"type":"commands"}]}],"changed_files":["Containerfile"]}

System Info

{"source":"https://github.com/woodpecker-ci/woodpecker","version":"next-111a0b4ea5"}

Additional context

No response

Validations

About this issue

  • Original URL
  • State: open
  • Created 7 months ago
  • Comments: 15 (14 by maintainers)

Most upvoted comments

I can’t reproduce with gitea 1.21.1. PR is only triggered once in woodpecker. Also, there’s just one webhooks in gitea’s list. This looks like an issue with gitea to me.

That might be, Ill try to debug this further.