{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Creates a new file or replaces an existing file in a repository.\n\n> [!NOTE]\n> If you use this endpoint and the \"[Delete a file](https://docs.github.com/rest/repos/contents/#delete-a-file)\" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. The `workflow` scope is also required in order to modify files in the `.github/workflows` directory.","properties":{"path":{"type":"object","properties":{"owner":{"type":"string","description":"The account owner of the repository. The name is not case sensitive."},"repo":{"type":"string","description":"The name of the repository without the `.git` extension. The name is not case sensitive."},"path":{"type":"string","description":"path parameter"}},"required":["owner","repo","path"],"additionalProperties":false},"body":{"type":"object","properties":{"message":{"type":"string","description":"The commit message."},"content":{"type":"string","description":"The new file content, using Base64 encoding."},"sha":{"type":"string","description":"**Required if you are updating a file**. The blob SHA of the file being replaced."},"branch":{"type":"string","description":"The branch name. Default: the repository’s default branch."},"committer":{"type":"object","description":"The person that committed the file. Default: the authenticated user.","properties":{"name":{"type":"string","description":"The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted."},"email":{"type":"string","description":"The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted."},"date":{"type":"string","examples":["\"2013-01-05T13:13:22+05:00\""]}},"required":["name","email"]},"author":{"type":"object","description":"The author of the file. Default: The `committer` or the authenticated user if you omit `committer`.","properties":{"name":{"type":"string","description":"The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted."},"email":{"type":"string","description":"The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted."},"date":{"type":"string","examples":["\"2013-01-15T17:13:22+05:00\""]}},"required":["name","email"]}},"required":["message","content"],"examples":[{"message":"my commit message","committer":{"name":"Monalisa Octocat","email":"octocat@github.com"},"content":"bXkgbmV3IGZpbGUgY29udGVudHM="}]}},"required":["path","body"],"additionalProperties":false},"name":"Create or update file contents","id":"github.repos.create-or-update-file-contents","example":{"path":{"owner":"octocat","repo":"hello-world","path":"example"},"body":{"message":"my commit message","committer":{"name":"Monalisa Octocat","email":"octocat@github.com"},"content":"bXkgbmV3IGZpbGUgY29udGVudHM="}},"maxRequests":1,"summary":false}}