Skip to content

When generating repo from template, default_branch returns as blank string #19082

@truesteps

Description

@truesteps

Gitea Version

1.16.3

Git Version

2.25.1

Operating System

Ubuntu 20.04.3 LTS (Focal Fossa)

How are you running Gitea?

I'm running gitea from the binary, through systemctl. I installed it from a tutorial I found online, recently updating it to the latest version, so I can use the generate repo endpoint.

Database

MySQL

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Description

Whenever I create a new repo from a template repo, I get back the repository detail as the request response, but the default_branch property is returned as an empty string. I think It should be the default branch, since when I fetch the detail of it in the next request, it's there, therefore I concluded this is a bug.

Allow me to send a gist with the entire response from the API https://gist.github.com/truesteps/43b4b13ac3619c92cbdc70c5622c6e02

Screenshots

Screenshot 2022-03-14 at 16 08 41

Metadata

Metadata

Assignees

No one assigned

    Labels

    modifies/apiThis PR adds API routes or modifies themtype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions