Skip to content
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

Add tests for webhook and fix some webhook bugs #33396

Merged
merged 10 commits into from
Jan 30, 2025

Conversation

lunny
Copy link
Member

@lunny lunny commented Jan 25, 2025

This PR created a mock webhook server in the tests and added integration tests for generic webhooks.
It also fixes bugs in package webhooks and pull request comment webhooks.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jan 25, 2025
@pull-request-size pull-request-size bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jan 25, 2025
@github-actions github-actions bot added modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code labels Jan 25, 2025
@lunny lunny force-pushed the lunny/add_webhook_test branch from e4e8f89 to f0142d0 Compare January 25, 2025 19:43
@lunny lunny added the backport/v1.23 This PR should be backported to Gitea 1.23 label Jan 26, 2025
@lunny lunny mentioned this pull request Jan 26, 2025
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jan 28, 2025
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jan 30, 2025
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jan 30, 2025
@lunny lunny enabled auto-merge (squash) January 30, 2025 02:48
@lunny lunny merged commit 75940a0 into go-gitea:main Jan 30, 2025
26 checks passed
@GiteaBot GiteaBot added this to the 1.24.0 milestone Jan 30, 2025
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jan 30, 2025
@GiteaBot
Copy link
Collaborator

I was unable to create a backport for 1.23. @lunny, please send one manually. 🍵

go run ./contrib/backport 33396
...  // fix git conflicts if any
go run ./contrib/backport --continue

@GiteaBot GiteaBot added the backport/manual No power to the bots! Create your backport yourself! label Jan 30, 2025
@lunny lunny deleted the lunny/add_webhook_test branch January 30, 2025 05:16
lunny added a commit to lunny/gitea that referenced this pull request Jan 30, 2025
This PR created a mock webhook server in the tests and added integration
tests for generic webhooks.
It also fixes bugs in package webhooks and pull request comment
webhooks.
@lunny lunny added the backport/done All backports for this PR have been created label Jan 30, 2025
lunny added a commit to lunny/gitea that referenced this pull request Jan 30, 2025
This PR created a mock webhook server in the tests and added integration
tests for generic webhooks.
It also fixes bugs in package webhooks and pull request comment
webhooks.
lunny added a commit that referenced this pull request Feb 2, 2025
This PR created a mock webhook server in the tests and added integration
tests for generic webhooks.
It also fixes bugs in package webhooks and pull request comment
webhooks.

This also corrected an error on the package webhook. The previous
implementation uses a `User` struct as an organization, now it has been
corrected but it will not be consistent with the previous
implementation, some fields which not belong to the organization have
been removed.

Backport #33396
Backport part of #33337
lunny added a commit that referenced this pull request Feb 4, 2025
Fix #32873 
Fix #33201 
~Fix #33244~
~Fix #33302~

depends on ~#33396~

A part of this PR should be backported to v1.23 manually.
lunny added a commit to lunny/gitea that referenced this pull request Feb 4, 2025
Fix go-gitea#32873
Fix go-gitea#33201
~Fix go-gitea#33244~
~Fix go-gitea#33302~

depends on ~go-gitea#33396~

A part of this PR should be backported to v1.23 manually.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/done All backports for this PR have been created backport/manual No power to the bots! Create your backport yourself! backport/v1.23 This PR should be backported to Gitea 1.23 lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. type/bug type/testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants