-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Possible fix the webhook API creation #13960
Conversation
Sorry to report, still seeing the error:
|
Is it because "Gitea" is not in the webhooks array: https://github.com/go-gitea/gitea/blob/master/services/webhook/webhook.go#L28-L59 Previously there was a default case: https://github.com/go-gitea/gitea/blob/v1.13.0/modules/webhook/webhook.go#L99-L138 |
@bobemoe done. |
@lunny, seems to be working at fist test using curl :) I will see if Drone is working next... |
Codecov Report
@@ Coverage Diff @@
## master #13960 +/- ##
==========================================
- Coverage 42.22% 42.08% -0.15%
==========================================
Files 710 710
Lines 77228 77230 +2
==========================================
- Hits 32612 32503 -109
- Misses 39252 39370 +118
+ Partials 5364 5357 -7
Continue to review full report at Codecov.
|
I can confirm that Drone is now able to use the API to add a webhook to a Gitea repo. And that from Gitea I am able to successfully test delivery of the Drone webhook :) |
@@ -60,12 +60,15 @@ var ( | |||
|
|||
// RegisterWebhook registers a webhook | |||
func RegisterWebhook(name string, webhook *webhook) { | |||
webhooks[models.HookTaskType(name)] = webhook | |||
webhooks[models.HookTaskType(strings.TrimSpace(name))] = webhook |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will keep that since it's harmless.
Maybe fix #13907