mirror of
				https://gitea.com/gitea/gitea-mcp.git
				synced 2025-11-04 04:11:50 +00:00 
			
		
		
		
	Encode content to base64 in UpdateFileFn (#26)
Same to CreateFileFn Reviewed-on: https://gitea.com/gitea/gitea-mcp/pulls/26 Reviewed-by: hiifong <i@hiif.ong> Co-authored-by: yp05327 <576951401@qq.com> Co-committed-by: yp05327 <576951401@qq.com>
This commit is contained in:
		@@ -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,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user