Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
git-branch

GitHub Action

Delete multiple branches

v2.0.1

Delete multiple branches

git-branch

Delete multiple branches

Delete multiple branches from repository

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Delete multiple branches

uses: dawidd6/[email protected]

Learn more about this action in dawidd6/action-delete-branch

Choose a version

Delete multiple branches Github Action

An action that deletes multiple branches from repository. Optionally one can provide a prefix or suffix strings that would be appended or prepended to every branch name.

Usage

- name: Delete PRs head branches
  uses: dawidd6/action-delete-branch@master
  with:
    github_token: ${{ secrets.GITHUB_TOKEN }}
    numbers: 13,22,${{ github.event.pull_request.number }}
- name: Delete pr-* branches
  uses: dawidd6/action-delete-branch@master
  with:
    github_token: ${{ secrets.GITHUB_TOKEN }}
    branches: 13,22,33
    prefix: 'pr-'
- name: Delete branch
  uses: dawidd6/action-delete-branch@master
  with:
    github_token: ${{ secrets.GITHUB_TOKEN }}
    branches: test
    suffix: '-done'