-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Expand file tree
/
Copy pathcreate_or_update_file.snap
More file actions
48 lines (48 loc) · 1.63 KB
/
create_or_update_file.snap
File metadata and controls
48 lines (48 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{
"annotations": {
"title": "Create or update file"
},
"description": "Create or update a single file in a GitHub repository. \nIf updating, you should provide the SHA of the file you want to update. Use this tool to create or update a file in a GitHub repository remotely; do not use it for local file operations.\n\nIn order to obtain the SHA of original file version before updating, use the following git command:\ngit ls-tree HEAD \u003cpath to file\u003e\n\nIf the SHA is not provided, the tool will attempt to acquire it by fetching the current file contents from the repository, which may lead to rewriting latest committed changes if the file has changed since last retrieval.\n",
"inputSchema": {
"type": "object",
"properties": {
"branch": {
"type": "string",
"description": "Branch to create/update the file in"
},
"content": {
"type": "string",
"description": "Content of the file"
},
"message": {
"type": "string",
"description": "Commit message"
},
"owner": {
"type": "string",
"description": "Repository owner (username or organization)"
},
"path": {
"type": "string",
"description": "Path where to create/update the file"
},
"repo": {
"type": "string",
"description": "Repository name"
},
"sha": {
"type": "string",
"description": "The blob SHA of the file being replaced."
}
},
"required": [
"owner",
"repo",
"path",
"content",
"message",
"branch"
]
},
"name": "create_or_update_file"
}