Skip to content

Unable to create Default Webhooks #24624

Closed
@kousu

Description

@kousu

Description

As of 9a0652f, the current main, it is impossible to create Default Webhooks using /admin/default-hooks/gitea/new. They are instead added as system webhooks, producing these database rows; notice that is_system_webhook = 1 in both:

sqlite> select * from webhook limit 3;
id|repo_id|owner_id|is_system_webhook|url|http_method|content_type|secret|events|is_active|type|meta|last_status|header_authorization_encrypted|created_unix|updated_unix
3|0|0|1|https://system-main|POST|1||{"push_only":true,"send_everything":false,"choose_events":false,"branch_filter":"*","events":{"create":false,"delete":false,"fork":false,"issues":false,"issue_assign":false,"issue_label":false,"issue_milestone":false,"issue_comment":false,"push":false,"pull_request":false,"pull_request_assign":false,"pull_request_label":false,"pull_request_milestone":false,"pull_request_comment":false,"pull_request_review":false,"pull_request_sync":false,"wiki":false,"repository":false,"release":false,"package":false}}|1|gitea||0||1683681122|1683681122
4|0|0|1|https://default-main|POST|1||{"push_only":true,"send_everything":false,"choose_events":false,"branch_filter":"*","events":{"create":false,"delete":false,"fork":false,"issues":false,"issue_assign":false,"issue_label":false,"issue_milestone":false,"issue_comment":false,"push":false,"pull_request":false,"pull_request_assign":false,"pull_request_label":false,"pull_request_milestone":false,"pull_request_comment":false,"pull_request_review":false,"pull_request_sync":false,"wiki":false,"repository":false,"release":false,"package":false}}|1|gitea||0||1683681147|1683681147

Gitea Version

9a0652f

Can you reproduce the bug on the Gitea demo site?

No -- but only because I don't have admin rights there

Log Gist

https://gist.github.com/kousu/8cf00c3a7a6a032679a76d1bc2fda47b

Screenshots

"Add a new default webhook":

Screenshot 2023-05-09 at 21-12-16 Gitea Git with a cup of tea

Adds it as a system webhook:

Screenshot 2023-05-09 at 21-12-30 Gitea Git with a cup of tea

Git Version

2.34.1

Operating System

Ubuntu 22.04

How are you running Gitea?

Built from git, run with ./gitea

Database

SQLite

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions