mirror of
https://github.com/go-gitea/gitea.git
synced 2026-03-12 02:24:21 -05:00
Gitea submits webhooks on "status" event, even if webhook is defined only for "push" #14006
Closed
opened 2025-11-02 10:59:53 -06:00 by GiteaMirror
·
28 comments
No Branch/Tag Specified
main
release/v1.25
release/v1.24
release/v1.23
release/v1.22
release/v1.21
release/v1.20
release/v1.19
release/v1.18
release/v1.17
release/v1.16
release/v1.15
release/v1.14
release/v1.13
release/v1.12
release/v1.11
release/v1.10
release/v1.9
release/v1.8
v1.25.3
v1.25.2
v1.25.1
v1.25.0
v1.24.7
v1.25.0-rc0
v1.26.0-dev
v1.24.6
v1.24.5
v1.24.4
v1.24.3
v1.24.2
v1.24.1
v1.24.0
v1.23.8
v1.24.0-rc0
v1.25.0-dev
v1.23.7
v1.23.6
v1.23.5
v1.23.4
v1.23.3
v1.23.2
v1.23.1
v1.23.0
v1.23.0-rc0
v1.24.0-dev
v1.22.6
v1.22.5
v1.22.4
v1.22.3
v1.22.2
v1.22.1
v1.22.0
v1.23.0-dev
v1.22.0-rc1
v1.21.11
v1.22.0-rc0
v1.21.10
v1.21.9
v1.21.8
v1.21.7
v1.21.6
v1.21.5
v1.21.4
v1.21.3
v1.21.2
v1.20.6
v1.21.1
v1.21.0
v1.21.0-rc2
v1.21.0-rc1
v1.20.5
v1.22.0-dev
v1.21.0-rc0
v1.20.4
v1.20.3
v1.20.2
v1.20.1
v1.20.0
v1.19.4
v1.21.0-dev
v1.20.0-rc2
v1.20.0-rc1
v1.20.0-rc0
v1.19.3
v1.19.2
v1.19.1
v1.19.0
v1.19.0-rc1
v1.20.0-dev
v1.19.0-rc0
v1.18.5
v1.18.4
v1.18.3
v1.18.2
v1.18.1
v1.18.0
v1.17.4
v1.18.0-rc1
v1.19.0-dev
v1.18.0-rc0
v1.17.3
v1.17.2
v1.17.1
v1.17.0
v1.17.0-rc2
v1.16.9
v1.17.0-rc1
v1.18.0-dev
v1.16.8
v1.16.7
v1.16.6
v1.16.5
v1.16.4
v1.16.3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v1.3.3
v1.4.0-rc1
v1.3.2
v1.3.1
v1.3.0
v1.3.0-rc2
v1.3.0-rc1
v1.2.3
v1.2.2
v1.2.1
v1.2.0
v1.2.0-rc3
v1.2.0-rc2
v1.1.4
v1.2.0-rc1
v1.1.3
v1.1.2
v1.1.1
v1.1.0
v1.0.2
v1.0.1
v1.0.0
v0.9.99
Labels
Clear labels
$20
$250
$50
$500
backport/done
💎 Bounty
docs-update-needed
good first issue
hacktoberfest
issue/bounty
issue/confirmed
issue/critical
issue/duplicate
issue/needs-feedback
issue/not-a-bug
issue/regression
issue/stale
issue/workaround
lgtm/need 2
modifies/api
modifies/translation
outdated/backport/v1.18
outdated/theme/markdown
outdated/theme/timetracker
performance/bigrepo
performance/cpu
performance/memory
performance/speed
pr/breaking
proposal/accepted
proposal/rejected
pr/wip
pull-request
reviewed/wontfix
💰 Rewarded
skip-changelog
status/blocked
topic/accessibility
topic/api
topic/authentication
topic/build
topic/code-linting
topic/commit-signing
topic/content-rendering
topic/deployment
topic/distribution
topic/federation
topic/gitea-actions
topic/issues
topic/lfs
topic/mobile
topic/moderation
topic/packages
topic/pr
topic/projects
topic/repo
topic/repo-migration
topic/security
topic/theme
topic/ui
topic/ui-interaction
topic/ux
topic/webhooks
topic/wiki
type/bug
type/deprecation
type/docs
type/enhancement
type/feature
type/miscellaneous
type/proposal
type/question
type/refactoring
type/summary
type/testing
type/upstream
Mirrored from GitHub Pull Request
Milestone
No items
No Milestone
Projects
Clear projects
No project
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/gitea#14006
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @wolfaba on GitHub (Jan 16, 2025).
Originally assigned to: @lunny on GitHub.
Description
Dear gitea developers,
we have a few webhooks in our gitea repositories. We have one webhook to jenkins generic trigger and other webhook to woodpecker. Webhook to jenkins should be called only for push events, webhook to woodpecker should be called for custom events (create, push and pull request events).
After update from gitea 1.22.6 to 1.23.1, gitea started trigger jenkins job 7 times instead one.
In gitea webhook config we can really see seven POST webhook requests to jenkins and to woodpecker. But woodpecker starts just one job, maybe because woodpecker filter the webhook requests and process only those from "push" events. But jenkins just start new job for every webhook trigger.
I have found that after gitea triggers the webhook on woodpecker, the woodpecker requests "status" on gitea. Gitea starts then webhooks again for this "status" request, even the trigger should happen only for push events.
If I disable woodpecker webhook, gitea sends no webhook to woodpecker, woodpecker does not request "status" on gitea, which means, gitea sends only one webhook request to jenkins for the "push" event.
I have activated debug log in gitea, but I am not sure if there is something important. I can see
and then webhook_sender queue processing
Could you please verify if the webhook trigger filter works correctly and for "Push events" trigger really only on "push" events and not on "status" events?
Thank you very much checking and eventually fixing.
Regards,
Robert Wolf.
Gitea Version
1.23.1
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
git version 2.30.2
Operating System
Debian 11.11 Linux
How are you running Gitea?
We use released gitea version, starting from systemd on Debian 11.11 Linux
Gitea version 1.23.1 built with GNU Make 4.3, go1.23.4 : bindata, sqlite, sqlite_unlock_notifyDatabase
PostgreSQL
@wolfaba commented on GitHub (Jan 16, 2025):
btw, I have tried to search, but have not found the same problem already reported
@wxiaoguang commented on GitHub (Jan 16, 2025):
Maybe the "status" webhook is related to Add new event commit status creation and webhook implementation #27151
@lunny
@lunny commented on GitHub (Jan 16, 2025):
I will investigate it and could you confirm whether you created a webhook with only a push event in Gitea?
@wolfaba commented on GitHub (Jan 17, 2025):
yes, for Jenkins, we have "Trigger on: Push events", see the attached screenshot

@m-erhardt commented on GitHub (Jan 17, 2025):
I'm affected by this as well. Judging by the JSON payload of the webhook I would guess this relates to Gitea Actions CI jobs...
My webhook is configured to only run on
Pushevents on themaster-branch.The
context-element of the JSON request bodys corresponds to the names of my CI jobs in the repo and thedescription-elements is eitherWaiting to runorSuccessful in [x]sSo it seems the webhook gets fired twice per CI job. One with
"description": "Waiting to run"and one with"description": "Successful in ...s"@dR3b commented on GitHub (Jan 20, 2025):
I'm affected too. Please backport this fix as soon as possible. Thanks
@foxit64 commented on GitHub (Jan 23, 2025):
I have the same problem! Gitea webhooks are send several times.
@wolfaba commented on GitHub (Jan 23, 2025):
@lunny do you have any time plan for next release with the fix? Thank you.
@lunny commented on GitHub (Jan 23, 2025):
This should be fixed in v1.23.2 I have sent a pull request #33320 and I hope it can be merged ASAP after that is merged I can release v1.23.2. The expectation date is outdated. 😢
@lunny commented on GitHub (Jan 30, 2025):
I think you can work around this issue by selecting custom events and exclusively choosing the push event at the moment.
@wolfaba commented on GitHub (Jan 30, 2025):
I have tried to select only push event and it still runs multiple webhooks.
@lunny commented on GitHub (Feb 3, 2025):
#33442 should have fixed this problem.
#33320 will allow configuration status webhook in settings and fix the correct status webhook content.
@otbutz commented on GitHub (Feb 6, 2025):
@lunny updated from 1.23.1 to 1.23.3 and was hit with a barrage of
Commit Status changedwebhook notifications:According to the settings of the webhook, commit status events shouldn't be active:
@otbutz commented on GitHub (Feb 6, 2025):
Could this be something persistency related? There hasn't been any event after I edited the webhook settings. (basically a no-op):
Enable
Statuses-> Apply -> DisableStatuses-> Apply@wolfaba commented on GitHub (Feb 6, 2025):
In our environment the version 1.23.3 is working fine now.
@balki commented on GitHub (Feb 6, 2025):
Same issue with a bunch of status messages and the telegram webhook went red due to 429 response.
My hook settings:
Hook type: telegram
Bot Token: XXXXXXXXXXXXX
Chat ID: ###########
Thread ID:
Trigger On:
Custom Events...
Repository Events
[✓] Create (Branch or tag created)
Branch filter:
tag[✓] Active
Example message:
Gitea version: 1.23.3 (archlinux)
@balki commented on GitHub (Feb 7, 2025):
Not just "Commit status" messages. Today got spammed with 'merge-requests created messages'. The hook is just supposed to notify on new tags created.
@lunny commented on GitHub (Feb 10, 2025):
Have you check your webhook configuration, whether it includes
Statuses?@lunny commented on GitHub (Feb 10, 2025):
Please check if you have any other high-level webhooks configured to receive all events. I am unable to reproduce the issue on my end.
@ZantsuRocks commented on GitHub (Feb 10, 2025):
I have 3 webhook and none of them send commit status. My discord server was flooded with commit status chances from CI in all three webhooks...
Gitea Version is 1.23.3 and as soon as i updated from 1.23.1 to 1.23.3 and started the service my discord began to popup the notifications.
The only way to stop was disabling all 3 webhooks.
@lunny commented on GitHub (Feb 10, 2025):
Can you enable statuses and disable statuses and active it to try again?
@lunny commented on GitHub (Feb 10, 2025):
Can you also check the history of this webhook and check the event types on the http headers.
@ZantsuRocks commented on GitHub (Feb 10, 2025):
One of the items:
Request:
Content:
I will try to reenable the hooks tomorrow with status enabled, and disabled again.
@otbutz commented on GitHub (Feb 11, 2025):
@lunny this has to be something related to persistency and/or database migrations.
Not a single false notification since.
@ZantsuRocks commented on GitHub (Feb 11, 2025):
After enabling and disabling the statuses it seems that the hook works as intended.
@lunny commented on GitHub (May 30, 2025):
Is this still a problem?
@wolfaba commented on GitHub (May 30, 2025):
I have confirmed in https://github.com/go-gitea/gitea/issues/33302#issuecomment-2639940402 that version 1.23.3 is working fine for us
@lunny commented on GitHub (May 30, 2025):
I'll close this and please feel free to reopen it or create a new issue if it's not resolved.