Gitee

by normal-coder
Verified

create_or_update_file

在 Gitee 仓库中创建或更新文件

Input Schema

NameRequiredDescriptionDefault
branchNoBranch name, defaults to the repository's default branch
contentYesFile content
messageYesCommit message
ownerYesRepository owner path (enterprise, organization, or personal path)
pathYesFile path
repoYesRepository path
shaNoFile SHA, required when updating an existing file

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "branch": { "description": "Branch name, defaults to the repository's default branch", "type": "string" }, "content": { "description": "File content", "type": "string" }, "message": { "description": "Commit message", "type": "string" }, "owner": { "description": "Repository owner path (enterprise, organization, or personal path)", "type": "string" }, "path": { "description": "File path", "type": "string" }, "repo": { "description": "Repository path", "type": "string" }, "sha": { "description": "File SHA, required when updating an existing file", "type": "string" } }, "required": [ "owner", "repo", "path", "content", "message" ], "type": "object" }