-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Expand file tree
/
Copy pathcreate_or_update_file.snap
More file actions
48 lines (48 loc) · 1.75 KB
/
Copy pathcreate_or_update_file.snap
File metadata and controls
48 lines (48 loc) · 1.75 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 rev-parse \u003cbranch\u003e:\u003cpath to file\u003e\n\nSHA MUST be provided for existing file updates.\n\nThis tool always writes the file with mode 100644 because the Contents API has no way to set the executable bit. If you need to publish an executable file, use push_files with a single-entry files array and mode set to 100755 instead.\n",
"inputSchema": {
"properties": {
"branch": {
"description": "Branch to create/update the file in",
"type": "string"
},
"content": {
"description": "Content of the file",
"type": "string"
},
"message": {
"description": "Commit message",
"type": "string"
},
"owner": {
"description": "Repository owner (username or organization)",
"type": "string"
},
"path": {
"description": "Path where to create/update the file",
"type": "string"
},
"repo": {
"description": "Repository name",
"type": "string"
},
"sha": {
"description": "The blob SHA of the file being replaced. Required if the file already exists.",
"type": "string"
}
},
"required": [
"owner",
"repo",
"path",
"content",
"message",
"branch"
],
"type": "object"
},
"name": "create_or_update_file"
}