-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gitea1.23.3: wrong PR logic & disabled webhooks still working #33489
Comments
Dear @wxiaoguang
|
According to: #33302 (comment)
Does it help? also @lunny |
Dear @wxiaoguang
all other options before, after, compare_url, id, message, url are similar maybe issue related with gitea jenkins plugin whith incorrect processing of 'open_pr_counter' parameter? |
@phoedos Have you tried to upgrade to v1.23.3 and you can reconfigure the webhook to uncheck |
Dear @lunny, nice to meet you! |
Can you check whether there are other level webhooks, like org level and system level webhooks will be triggered. I cannot reproduce in my local machine with v1.23.3 |
Dear @lunny only ORG one and this configuration disable branch in Jenkins during commit when PR is active |
Action1: Action2: Action3: expected result:
actual result
|
Can you also provide the history records (Recent Deliveries) in Gitea side? |
dear @yp05327 here is txt with webhook data. |
When you create a new branch, two webhooks will be triggered: one for the branch creation event and another for the commit push event. I reviewed the code again. As far as I know, there hasn’t been any change in this logic between versions 1.22 and 1.23. When you push a commit, a webhook will be triggered regardless of whether a pull request (PR) is created with the branch as its head or not. This means that even if PR events are disabled, it’s normal for a webhook to be triggered when you push a commit to the head branch of the PR. GitHub exhibits similar behavior. Since all your PR events are disabled, I don't understand why I don't know how it works about |
From the webhooks.txt, the behaviours in Gitea side are all expected. There are something I can not understand:
What do you mean
Same to @lunny. There are only As you also said above:
So after the PR created, the
According to webhook.txt, these two cases are worked because the target of push event workflow is
The According to the analyzation above, the issue is clear: I hope this analyzation can be helpful to you. :) |
Dear guys, |
Thank you for sharing! This could be really helpful for others facing similar issues. |
Description
Hi guys
after upgrading to gitea 1.22.6->1.23.1 have next issue related with Pull Requests, Gitea and Jenkins integration
Jenkins version - latest jenkins:2.495-jdk21
Gitea jenkins plugin - latest 234.v60def593ec50
Inside gitea ORG have next webhook settings:
url: https://jenkinsurl/gitea-webhook/post
method: POST
POST content type: application/json
Trigger on: custom events [NO PR actions are activated]
Branch filter: *
Inside org I have a repo with 'main' and 'test' branches
Later, inside gitea interface I make a PR test->main branch and stay it unclosed (imagine it's under review for another developer)
Now I continue work on 'test' branch and make some new commits .
expected result: gitea will send a webhook, jenkins run a pipeline on 'test' branch according to jenkinsfile logic
actual resut: gitea add new commit to PR, test branch (inside jenkins) is disabled by Gitea.
Why This Behavior Seems Incorrect:

Unexpected Webhook Behavior – Gitea sends a PR webhook to Jenkins even though PR webhooks are explicitly disabled.
Forced PR Updates – New commits to test are automatically added to the existing open PR, making it impossible to continue working on test without affecting the PR.
Regression from 1.22.6 – This behavior did not occur in Gitea 1.22.6 and appears to be a new issue introduced in 1.23.1.
Impact:
Developers cannot work on test independently after opening a PR.
PRs may receive uncontrolled code changes, which could result in unintended code being merged into main.
Request for Investigation:
Could you please confirm if this is an intended change in Gitea 1.23.1 or a potential bug? If it is an intended change, is there a way to prevent this behavior?
Gitea Version
1.23.1
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
docker-compose
Database
PostgreSQL
The text was updated successfully, but these errors were encountered: