Skip to content

A GitHub action to automatically delete the branch after a pull request has been merged.

Notifications You must be signed in to change notification settings

enicho/branch-cleanup-action

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Branch Cleanup Action

Travis CI

A GitHub action to automatically delete the branch after a pull request has been merged.

NOTE: This will never delete the repository's default branch. If the pull request is closed without merging, it will not delete it.

Table of Contents

Usage

workflow "on pull request merge, delete the branch" {
  on = "pull_request"
  resolves = ["branch cleanup"]
}

action "branch cleanup" {
  uses = "jessfraz/branch-cleanup-action@master"
  secrets = ["GITHUB_TOKEN"]
  env = {
    BRANCH = "master"
  }
}

BRANCH environment is for specifying which master branch you used. (for example when deploying to staging it will not deleted)

demo

Contributing

Running the tests

The tests use shellcheck. You don't need to install anything. They run in a container.

$ make test

About

A GitHub action to automatically delete the branch after a pull request has been merged.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 64.9%
  • Makefile 22.0%
  • Dockerfile 13.1%