Encode content to base64 in UpdateFileFn (#26)
All checks were successful
release-nightly / release-image (push) Successful in 2m53s

Same to CreateFileFn Reviewed-on: #26 Reviewed-by: hiifong <i@hiif.ong> Co-authored-by: yp05327 <576951401@qq.com> Co-committed-by: yp05327 <576951401@qq.com>
This commit was merged in pull request #26.
This commit is contained in:
2025-04-11 05:03:36 +00:00
committed by hiifong
parent af0975d93f
commit f656c92cda

View File

@@ -144,7 +144,7 @@ func UpdateFileFn(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolRe
opt := gitea_sdk.UpdateFileOptions{
SHA: sha,
Content: content,
Content: base64.StdEncoding.EncodeToString([]byte(content)),
FileOptions: gitea_sdk.FileOptions{
Message: message,
BranchName: branchName,