Skip to content

Webhook creation using gitea api not resulting in proper setup of webhook #20178

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

Closed
k-p-ani opened this issue Jun 30, 2022 · 1 comment
Closed
Labels

Comments

@k-p-ani
Copy link

k-p-ani commented Jun 30, 2022

Description

Hi,
I am trying to setup webhook using gitea api. below is the sample curl. I set that, this webhook must be triggered only for PUSH EVENTS (by setting events of type push_only). After execution of curl, when I check webhook tab in settings, I can see that webhook does gets created but, the event selected is as custom (not push )and under custom no event type is selected.

curl --location --request POST 'http://host/api/v1/repos/<MY_REPO>/hooks'
--header 'Content-Type: application/json'
--user ':'
--header 'Content-Type: application/json'
--data-raw '{
"active": true,
"branch_filter": "*",
"config": {
"content_type": "json",
"url": "http://repositories/2222",
"http_method": "post"
},
"events": [
"push_only"
],
"type": "gitea"
}'

Thanks

Gitea Version

latest

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

latest

Operating System

ubuntu

How are you running Gitea?

containerised Gitea app

Database

No response

@jolheiser
Copy link
Member

It appears the webhook API always chooses custom events, and the correct hook event is just push.
I'm going to close this, as they should be functionally the same.

@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants