Webhook sent twice when using Add File on Gitea repo #3631

Closed
opened 2025-11-02 05:20:05 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @maxifom on GitHub (Jul 20, 2019).

  • Gitea version (or commit ref): 1.9.0+rc2-2-g91e24a3a1
  • Git version: not needed
  • Operating system: Docker container on system 4.15.0-42-generic #45-Ubuntu SMP Thu Nov 15 19:32:57 UTC 2018 x86_64 x86_64 x86_64 GNU/Linu
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
  • Log gist:

Description

[Macaron] 2019-07-20 10:29:28: Started GET /username/repo/_new/master/sdf123 for MYIP
[Macaron] 2019-07-20 10:29:28: Completed GET /username/repo/_new/master/sdf123 200 OK in 11.289231ms

[Macaron] 2019-07-20 10:29:28: Started POST /username/repo/_new/master/ for MYIP

[Macaron] 2019-07-20 10:29:29: Started GET /api/internal/hook/pre-receive/username/repo?old=xxxxxxxxxxxxxxxxxxxxxxxx&new=xxxxxxxxxxxxxxxxxxxxxxxx&ref=refs%2Fheads%2Fmaster&userID=1&gitObjectDirectory=%2Fdata%2Fgit%2Frepositories%2Fusername%2Frepo.git%2F.%2Fobjects%2Fincoming-gpBOgg&gitAlternativeObjectDirectories=%2Fdata%2Fgit%2Frepositories%2Fusername%2Frepo.git%2F.%2Fobjects&prID=0 for 127.0.0.1

[Macaron] 2019-07-20 10:29:29: Completed GET /api/internal/hook/pre-receive/username/repo?old=xxxxxxxxxxxxxxxxxxxxxxxx&new=xxxxxxxxxxxxxxxxxxxxxxxx&ref=refs%2Fheads%2Fmaster&userID=1&gitObjectDirectory=%2Fdata%2Fgit%2Frepositories%2Fusername%2Frepo.git%2F.%2Fobjects%2Fincoming-gpBOgg&gitAlternativeObjectDirectories=%2Fdata%2Fgit%2Frepositories%2Fusername%2Frepo.git%2F.%2Fobjects&prID=0 200 OK in 1.858148ms

[Macaron] 2019-07-20 10:29:29: Started GET /api/internal/hook/post-receive/username/repo?old=xxxxxxxxxxxxxxxxxxxxxxxx&new=xxxxxxxxxxxxxxxxxxxxxxxx&ref=refs%2Fheads%2Fmaster&userID=1&username=username for 127.0.0.1

[Macaron] 2019-07-20 10:29:29: Completed GET /api/internal/hook/post-receive/username/repo?old=xxxxxxxxxxxxxxxxxxxxxxxx&new=xxxxxxxxxxxxxxxxxxxxxxxx&ref=refs%2Fheads%2Fmaster&userID=1&username=username 200 OK in 34.672842ms

Screenshots

Screenshot from 2019-07-20 15-39-28

Webhook sent twice for the same push event, when I commit from CMD everything is fine

Originally created by @maxifom on GitHub (Jul 20, 2019). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.9.0+rc2-2-g91e24a3a1 - Git version: not needed - Operating system: Docker container on system 4.15.0-42-generic #45-Ubuntu SMP Thu Nov 15 19:32:57 UTC 2018 x86_64 x86_64 x86_64 GNU/Linu - Database (use `[x]`): - [x] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [x] Yes (provide example URL): https://try.gitea.io/qwkemklqkelqw/test - [ ] No - [ ] Not relevant - Log gist: ## Description ``` [Macaron] 2019-07-20 10:29:28: Started GET /username/repo/_new/master/sdf123 for MYIP [Macaron] 2019-07-20 10:29:28: Completed GET /username/repo/_new/master/sdf123 200 OK in 11.289231ms [Macaron] 2019-07-20 10:29:28: Started POST /username/repo/_new/master/ for MYIP [Macaron] 2019-07-20 10:29:29: Started GET /api/internal/hook/pre-receive/username/repo?old=xxxxxxxxxxxxxxxxxxxxxxxx&new=xxxxxxxxxxxxxxxxxxxxxxxx&ref=refs%2Fheads%2Fmaster&userID=1&gitObjectDirectory=%2Fdata%2Fgit%2Frepositories%2Fusername%2Frepo.git%2F.%2Fobjects%2Fincoming-gpBOgg&gitAlternativeObjectDirectories=%2Fdata%2Fgit%2Frepositories%2Fusername%2Frepo.git%2F.%2Fobjects&prID=0 for 127.0.0.1 [Macaron] 2019-07-20 10:29:29: Completed GET /api/internal/hook/pre-receive/username/repo?old=xxxxxxxxxxxxxxxxxxxxxxxx&new=xxxxxxxxxxxxxxxxxxxxxxxx&ref=refs%2Fheads%2Fmaster&userID=1&gitObjectDirectory=%2Fdata%2Fgit%2Frepositories%2Fusername%2Frepo.git%2F.%2Fobjects%2Fincoming-gpBOgg&gitAlternativeObjectDirectories=%2Fdata%2Fgit%2Frepositories%2Fusername%2Frepo.git%2F.%2Fobjects&prID=0 200 OK in 1.858148ms [Macaron] 2019-07-20 10:29:29: Started GET /api/internal/hook/post-receive/username/repo?old=xxxxxxxxxxxxxxxxxxxxxxxx&new=xxxxxxxxxxxxxxxxxxxxxxxx&ref=refs%2Fheads%2Fmaster&userID=1&username=username for 127.0.0.1 [Macaron] 2019-07-20 10:29:29: Completed GET /api/internal/hook/post-receive/username/repo?old=xxxxxxxxxxxxxxxxxxxxxxxx&new=xxxxxxxxxxxxxxxxxxxxxxxx&ref=refs%2Fheads%2Fmaster&userID=1&username=username 200 OK in 34.672842ms ``` ## Screenshots <!-- **If this issue involves the Web Interface, please include a screenshot** --> ![Screenshot from 2019-07-20 15-39-28](https://user-images.githubusercontent.com/20924207/61577706-959faf80-ab04-11e9-8131-8d51f96720d9.png) ## Webhook sent twice for the same push event, when I commit from CMD everything is fine
Author
Owner

@lunny commented on GitHub (Jul 21, 2019):

This should be fixed by #7511

@lunny commented on GitHub (Jul 21, 2019): This should be fixed by #7511
Author
Owner

@lafriks commented on GitHub (Jul 21, 2019):

Please reopen if not fixed by #7511

@lafriks commented on GitHub (Jul 21, 2019): Please reopen if not fixed by #7511
Author
Owner

@matrozov commented on GitHub (Nov 26, 2019):

Please reopen. Reproduced on the version 1.11.0

@matrozov commented on GitHub (Nov 26, 2019): Please reopen. Reproduced on the version 1.11.0
Author
Owner

@lunny commented on GitHub (Nov 27, 2019):

@matrozov Please submit a new issue and give some detail. Since webhooks have been changed a lot on v1.11, I think that maybe another reason.

@lunny commented on GitHub (Nov 27, 2019): @matrozov Please submit a new issue and give some detail. Since webhooks have been changed a lot on v1.11, I think that maybe another reason.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3631