Closed
Description
Description
Related to: https://github.com/go-gitea/gitea/actions/runs/5086056277/jobs/9140155510
You can add the following test code in TestEmptyRepoAddFileByAPI
:
req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/user30/empty?token=%s", token))
resp = session.MakeRequest(t, req, http.StatusOK)
var apiRepo api.Repository
DecodeJSON(t, resp, &apiRepo)
assert.Equal(t, "new_branch", apiRepo.DefaultBranch)
No sure whether it is by design. But in web ui will have some bugs:
ps: not sure how to use this api correctly
I got repo is empty
error. But the file was uploaded successed.
Gitea Version
latest
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
build
Database
None