We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Related to: https://github.com/go-gitea/gitea/actions/runs/5086056277/jobs/9140155510
You can add the following test code in TestEmptyRepoAddFileByAPI:
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)
Result:
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.
repo is empty
latest
No
No response
build
None
The text was updated successfully, but these errors were encountered:
cc @wxiaoguang
Sorry, something went wrong.
Let's fix it: Update repo's default branch when adding new files in an empty one #25017
Update repo's default branch when adding new files in an empty one (#…
a90988d
…25017) Fix #25014 Only API needs this fix. On the Web UI, users could only add new file on the default branch.
Successfully merging a pull request may close this issue.
Description
Related to: https://github.com/go-gitea/gitea/actions/runs/5086056277/jobs/9140155510
You can add the following test code in
TestEmptyRepoAddFileByAPI
:Result:
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
The text was updated successfully, but these errors were encountered: