create_or_update_file
Create or update files in Gitee repositories by specifying the repository path, file content, and commit message. Manage branches and file SHA for precise file operations.
Instructions
在 Gitee 仓库中创建或更新文件
Input Schema
Name | Required | Description | Default |
---|---|---|---|
branch | No | Branch name, defaults to the repository's default branch | |
content | Yes | File content | |
message | Yes | Commit message | |
owner | Yes | Repository owner path (enterprise, organization, or personal path) | |
path | Yes | File path | |
repo | Yes | Repository path | |
sha | No | File 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"
}