Skip to content
delete

GitHub Action

arborist-action

v1.0.1 Latest version

arborist-action

delete

arborist-action

Prune orphaned branches from a forest of repos

Installation

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

              

- name: arborist-action

uses: jhoblitt/[email protected]

Learn more about this action in jhoblitt/arborist-action

Choose a version

arborist-action

GitHub Action to run arborist.

A Tidy Repo Forest

Prune orphaned branches from a forest of repos.

Usage

Config File

See arborist#config-file for documentation on the .arborist.yaml configuration file.

Example Workflow

---
name: Arborist

"on":
  - create
  - delete
  - pull_request
  - push

permissions:
  contents: write

jobs:
  arborist:
    name: Prune dead branches
    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v3

      - name: run arborist
        uses: jhoblitt/arborist-action@v1
        with:
          repo-token: "${{ secrets.GITHUB_TOKEN }}"

Inputs

Name Type Required Description
repo-token String Yes GitHub API Token

GitHub API Tokens

Note that the ${{ secrets.GITHUB_TOKEN }} API token is limited in scope to the local repository. If arborist needs to be able to prune branches from remote repositories, then a "Personal Access Token" will need to be created with the appropriate scope(s).