Delete File
github.delete_file
ActionBusiness appsconnection required
Calls the GitHub API DELETE /repos/{owner}/{repo}/contents/{path}.
Commit the removal of a file from a repository.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- Bearer token
- Providers
- GitHub
- Secret shape
- the GitHub personal access token
- Resolved by
- config.connection_id, else node.connection_id, else the tenant's sole GitHub connection
Configuration
8 fields, 4 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
owner Repository owner — the user or organisation login. Supports {{ }}. | string | Yes | — | — | octocat |
repo Repository name, without the owner prefix. Supports {{ }}. | string | Yes | — | — | hello-world |
path Path of the file inside the repository, e.g. docs/README.md. | string | Yes | — | — | docs/README.md |
message Commit message for this change. | string | Yes | — | — | Update docs/README.md |
branch Branch to commit on. Empty uses the repository's default branch. | string | No | — | — | — |
sha Blob SHA to delete. Left empty the step reads it from the branch first. | string | No | — | — | — |
committer_name Commit author name. Defaults to the token's user. | string | No | — | — | — |
committer_email Commit author email. Required when committer_name is set. | string | Conditional | — | email format; only with committer_name | — |
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"message": "Update docs/README.md",
"owner": "octocat",
"path": "docs/README.md",
"repo": "hello-world"
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
ok True when GitHub accepted the call. | boolean | true |
path Path of the file that was written. | string | — |
sha Blob SHA of the new content — pass it to the next update. | string | — |
size Size of the new blob in bytes. | number | — |
html_url Link to the file on GitHub. | string | — |
commit_sha SHA of the commit this write created. | string | — |
commit_html_url Link to that commit. | string | — |
{
"commit_html_url": "",
"commit_sha": "",
"html_url": "",
"ok": true,
"path": "",
"sha": "",
"size": 0
}Solutions with GitHub
See Delete File run in a workflow.
In a technical demo we add the GitHub connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.