github.onBranchDeleted starts an automation when a repository branch is deleted.
automations/github-branch-deleted.automation.ts
delete payload with ref_type: "branch". Requires Contents read permission.Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Start an automation when GitHub deletes a branch.
github.onBranchDeleted starts an automation when a repository branch is deleted.
import { automation, t } from "automate.ax"
import { github } from "automate.ax/github"
export default automation("GitHub branch deleted", () => {
const event = github.onBranchDeleted()
github.createIssue({
owner: event.repository.owner.login,
repository: event.repository.name,
title: t`Branch deleted: ${event.ref}`,
})
})
delete payload with ref_type: "branch". Requires Contents read permission.