Skip to content
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

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

Closed
gabriel-vasile opened this issue Aug 2, 2022 · 2 comments · Fixed by #20642
Closed

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

gabriel-vasile opened this issue Aug 2, 2022 · 2 comments · Fixed by #20642
Labels
Milestone

Comments

@gabriel-vasile
Copy link
Contributor

gabriel-vasile commented 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

gabriel-vasile added a commit to gabriel-vasile/gitea that referenced this issue Aug 2, 2022
xorm.db.Insert errors for empty slices. Fixes: go-gitea#20641
techknowlogick pushed a commit that referenced this issue Aug 4, 2022
xorm.db.Insert errors for empty slices. Fixes: #20641

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
@lunny lunny added this to the 1.17.1 milestone Aug 4, 2022
vsysoev pushed a commit to IntegraSDL/gitea that referenced this issue Aug 10, 2022
xorm.db.Insert errors for empty slices. Fixes: go-gitea#20641

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
@wxiaoguang
Copy link
Contributor

Wait for backport

@wxiaoguang wxiaoguang reopened this Aug 11, 2022
lunny added a commit to lunny/gitea that referenced this issue Aug 12, 2022
xorm.db.Insert errors for empty slices. Fixes: go-gitea#20641

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
lafriks added a commit that referenced this issue Aug 12, 2022
Fixes: #20641

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Gabriel Vasile <gabriel.vasile@email.com>
@zeripath
Copy link
Contributor

Fixed by #20768

@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

Successfully merging a pull request may close this issue.

4 participants