mirror of
https://github.com/go-gitea/gitea.git
synced 2026-03-11 17:46:29 -05:00
push webhook doesn't fire when pull request is merged
#9545
Closed
opened 2025-11-02 08:42:30 -06:00 by GiteaMirror
·
13 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
v1.16.2
v1.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.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
No Label
issue/needs-feedback
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#9545
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 @berwyn on GitHub (Sep 9, 2022).
Description
I have a sever with Drone and Gitea setup where I want to run steps every time a PR is merged. Drone ignores the PR closed/merged action, so I thought to filter by pushes to
main, however Gitea doesn't dispatch apushevent when I merge my PRs (configured as rebase then fast-forward).Since I cannot find any documentation that lays out what events are pushed and when, I have to assume it's a bug that no push webhook is fired when new commits are pushed to a ref using a PR.
Gitea Version
1.17.2
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
gitea/gitea:1.17-rootlesswith docker-compose,docker-ce 20.10.18running on Ubuntu 22.04Database
PostgreSQL
@jerry3k commented on GitHub (Sep 10, 2022):
I can confim we have the same issue after we upgraded our Gitea from 1.16 to 1.17. Here are the version with the issue:
Drone Server: drone/drone:2.9.1
Gitea: 1.17.0
Manually 'Test Delivery' from Gitea does fire the webhook but not from 'push'.
Also Tested: I can confirm the issue was not there for 1.16.9.
Can folks please check which of these New Features/Setting change needs to be configured to get this working: https://blog.gitea.io/2022/07/gitea-1.17.0-is-released/#:~:text=Gitea%201.17%20lays%20the%20foundation,avatar%20can%20now%20be%20communicated.
My hunch is its this change: https://blog.gitea.io/2022/07/gitea-1.17.0-is-released/#-change-initial-trust-model-to-committer-18335httpsgithubcomgo-giteagiteapull18335 (Change initial trust model to committer ) Can someone test please.
@exu-g commented on GitHub (Sep 11, 2022):
Push events never fire for me either. I tested creating commits directory to a monitored branch and merging a pull request.
Gitea 1.17.2
Woodpecker 0.15.4
In the Monitoring tab, the GET /user/events seems stuck
@exu-g commented on GitHub (Sep 12, 2022):
Creating a tag doesn't fire events (Create in webhook) either, with /user/events being stuck.
@xtulnx commented on GitHub (Sep 16, 2022):
@jerry3k @RealStickman Did you fix it please?
@jerry3k commented on GitHub (Sep 16, 2022):
@xtulnx no fix available as of yet.
@lunny commented on GitHub (Sep 19, 2022):
webhookis unrelated with/user/eventswhich is just related with notification UI. Could you find the webhook record in history?@xtulnx commented on GitHub (Sep 20, 2022):
@jerry3k @RealStickman hi, I temporarily solved the problem of service exception by downgrading.
Stop the service. Back up your data if necessary
Git Image tag use 1.16.9:
"gitea/gitea:1.16.9"Delete the record with type=9 in the
repo_unittable (Database):Modify version=211 in the version table:
Downgraded 1.17.2 and 1.18.0-dev successfully.
Now my webhook and the latest activity in the homepage are back to normal
@jerry3k commented on GitHub (Sep 21, 2022):
Please do NOT do this, as you will be UNABLE to upgrade it in future!
@wxiaoguang commented on GitHub (Sep 28, 2022):
I just setup a Gitea 1.17.2 (docker/docker-rootless) locally and did a full test, all work as expected.
If there is a problem, there are only a few possibilities:
(off topic:
/user/eventsis designed to block for long time for long-polling, it's not related. And DO NOT downgrade by changing the version value in database manually if you are not an experienced Gitea developer)If you think you encounter a bug, it needs more information to debug. It would be very helpful to provide a reproducible setup (docker-compose config and steps)
The details about
pushevent and webhook:client git push -> ssh server -> gitea serv sub-command -> git operation -> git hook runs scripts in the repository on the server -> gitea hook sub-command calls the internal HTTP api -> gitea web gets the push event -> insert into database (show activity on the dashboard) -> trigger webhook.
gitea online editor -> git operation -> git hook -> (the same as above).
Test Result
Docker (root)
Docker (rootless, merge PR with rebase)
@exu-g commented on GitHub (Sep 28, 2022):
@wxiaoguang Thanks for the detailed reply.
I can confirm storing stuff on a samba share was the issue for me. Local storage works.
Guess I'll have to use that going forward for gitea.
@kSandr-ki commented on GitHub (Apr 17, 2023):
I still don't understand
how docker version affects this, is it possible to somehow fix this without touching docker? I really dont wanna touch docker on production server ....
@wxiaoguang commented on GitHub (Apr 17, 2023):
Because it's a Docker's bug:
@kSandr-ki commented on GitHub (Apr 18, 2023):
thanks