branch-cleaner

command
v0.0.0-...-a4d4041 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

README

Branch-Cleaner

Functionality

The branch-cleaner scans GitHub repositories for branches of a specific pattern and deletes them.

You have to specify at the the --repository and --branch-pattern CLI parameters to run branch-cleaner. repository is set in the format {org}/{repo}, branch-pattern is the regexp pattern of the branches which should be cleaned.

When the --keep-branches=N is set, it keeps the last N matching branches sorted in alphabetical order.
When --ignore-open-prs=false it checks the branches for open PRs before deletion. If there are any, the branch won't be deleted.
When --release-branch-mode=true it checks release branch names for semver versions and searches for an existing Github release tag (v{major}.{minor}.0) for this version. Release branches which do not have a version yet are neither counted nor considered for deletion, because they are not released yet. If matching branch names do not include a semver version branch-cleaner fails in this mode. Additionally, this mode deletes branch-protection rules for deleted branches if they exist.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL