Owner
RequiredTextUser or organisation.
This input offers a picker for repository from your connected account. You can also supply its value directly.
octocat
Remove a branch — the clean-up step after a merge.
First, connect GitHub in Services. Then open Actions → + → GitHub and choose Delete a Branch.
Running or testing this action deletes or removes something in your connected service.
A pull request cannot be deleted, but the branch behind it can, and that is what the website's "Delete branch" button does after a merge. Deleting a merged branch loses nothing: the commits live on in the base branch.
The default branch and any branch a protection rule covers cannot be deleted; both answer 422. A branch that is already gone answers 422 as well, so re-running an action is safe but not silent.
Give the branch name alone, without a `refs/heads/` prefix. Names containing a slash — `feature/login` — cannot be addressed here, because the slash has to reach GitHub unescaped and this client escapes every path value.
Answers 204 with no body.
Open an input to choose its value. Keep a fixed value with Text, receive it from Shortcuts, ask when the action runs, or use an Earlier Step. Read how input sources work.
User or organisation.
This input offers a picker for repository from your connected account. You can also supply its value directly.
octocat
Name only, without the owner and without .git.
This input offers a picker for repository from your connected account. You can also supply its value directly.
Hello-World
Branch name, with no refs/heads/ prefix and no slashes.
This input offers a picker for branch from your connected account. You can also supply its value directly.
feature-login
The app does not declare selectable response fields for this action. A successful operation may return no content. Inspect the run in Logs to see the service’s response.
If the result is unexpected, open Logs in Shortcutify, select the run, and inspect this step’s inputs and response.
Request: DELETE https://api.github.com/repos/{owner}/{repo}/git/refs/heads/{branch}
Action identifier: github.branches.delete.v1
Permissions declared for this action: contents:write. The account’s own access rules also apply.
| Input | Request key | Location |
|---|---|---|
| Owner | owner | path |
| Repository | repo | path |
| Branch | branch | path |