1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-17 15:58:36 +00:00

Refactor "change file" API (#34855)

Follow up the "editor" refactor, use the same approach to simplify code,
and fix some docs & comments

---------

Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: delvh <dev.lh@web.de>
This commit is contained in:
wxiaoguang
2025-06-26 02:25:20 +08:00
committed by GitHub
parent 1839110ea6
commit 75aa23a665
10 changed files with 199 additions and 357 deletions

View File

@@ -27,7 +27,7 @@ func getUpdateFileOptions() *api.UpdateFileOptions {
content := "This is updated text"
contentEncoded := base64.StdEncoding.EncodeToString([]byte(content))
return &api.UpdateFileOptions{
DeleteFileOptions: api.DeleteFileOptions{
FileOptionsWithSHA: api.FileOptionsWithSHA{
FileOptions: api.FileOptions{
BranchName: "master",
NewBranchName: "master",