Skip to content

Repo generated from template fails when template has no webhooks #20641

Closed
@gabriel-vasile

Description

@gabriel-vasile

Description

To reproduce in web UI:

  1. create a repo and check "Mark repository as template"
  2. create another repo using the template in step 1. In "Template Items", check "Webhooks" checkmark.

What I expected: step 2 creates a new, empty repo
What happened: web/repo/repo.go:195:handleCreateError() [E] CreatePost: no element on slice when insert. Pretty cryptic error I would say. grepping project returns no result.

Gitea Version

head main

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?

./gitea web

Database

SQLite

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions