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.

FieldTypeRequiredDefaultConstraintsExample
owner
Repository owner — the user or organisation login. Supports {{ }}.
stringYes——octocat
repo
Repository name, without the owner prefix. Supports {{ }}.
stringYes——hello-world
path
Path of the file inside the repository, e.g. docs/README.md.
stringYes——docs/README.md
message
Commit message for this change.
stringYes——Update docs/README.md
branch
Branch to commit on. Empty uses the repository's default branch.
stringNo———
sha
Blob SHA to delete. Left empty the step reads it from the branch first.
stringNo———
committer_name
Commit author name. Defaults to the token's user.
stringNo———
committer_email
Commit author email. Required when committer_name is set.
stringConditional—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

FieldTypeExample
ok
True when GitHub accepted the call.
booleantrue
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
}

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.