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

Closed
opened 2025-11-02 08:35:35 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @gabriel-vasile on GitHub (Aug 2, 2022).

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

Originally created by @gabriel-vasile on GitHub (Aug 2, 2022). ### 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
GiteaMirror added the type/bug label 2025-11-02 08:35:35 -06:00
Author
Owner

@wxiaoguang commented on GitHub (Aug 11, 2022):

Wait for backport

@wxiaoguang commented on GitHub (Aug 11, 2022): Wait for backport
Author
Owner

@zeripath commented on GitHub (Aug 17, 2022):

Fixed by #20768

@zeripath commented on GitHub (Aug 17, 2022): Fixed by #20768
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#9330