Github Commit Files
github_commit_filesCommits text file changes to a GitHub branch, including deletions and merge commits, by writing new content or null for each path.
Instructions
Commits text files to a branch, writing each path in files and deleting each one set to null. GitHub signs the commit, as it does for github_create_empty_commit. A second parent makes a merge commit through the Git Database API, since the signing mutation takes one parent, and GitHub leaves that commit unsigned. Its tree starts from the second parent's, so files carries every file the branch changes as it should read after the merge. See #547.
Workflow and conventions: github_get_skill('pr-management').
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | Yes | New text content by path from the repository root, or null to delete it | |
| branch | Yes | Branch to commit to, in this repository rather than a fork | |
| message | Yes | Commit message. Its first line is the headline | |
| parents | No | The head the files were read at, then for a merge commit the commit to merge in | |
| repo_name | Yes | ||
| repo_owner | Yes | ||
| allow_default_branch | No | Commit to the default branch, which is refused otherwise |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| branch | Yes | ||
| parents | Yes | ||
| html_url | Yes | ||
| tree_sha | Yes | ||
| commit_sha | Yes |