fpicalausa/Remove Stale Branches

Cleanup stale branches from a repository

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
github-tokenPAT for GitHub API authentication.no${{ github.token }}
dry-runFlag that prevents this action from doing any modification to the repository. nofalse
exempt-organizationName of a GitHub organization. Branches for which the latest committer belongs to this organization will be exempt from cleanup. no
restrict-branches-regexRegular expression defining branch names that are eligible for cleanup. Defaults to all. no
exempt-branches-regexRegular expression defining branch names that are exempt from cleanup, out of the ones selected for cleanup using `restrict-branches-regex`. Defaults to `^(main|master)$`. no^(main|master)$
exempt-protected-branchesWhether protected branches are exemptednotrue
exempt-authors-regexRegular expression defining authors who are exempt from cleanup. By default, no author is exempted. no
stale-branch-messageTemplate for commit comments notifying the author that their branch will be removed. no@{author} Your branch [{branchName}]({branchUrl}) hasn't been updated in the last {daysBeforeBranchStale} days and is marked as stale. It will be removed in {daysBeforeBranchDelete} days. If you want to keep this branch around, add new commits to this branch or protect it. To generate an empty commit to keep the branch alive, run the following commands: ```bash git switch {branchName} git commit --allow-empty -m 'Keep branch alive' git push ```
days-before-branch-staleNumber of days since the last commit before a branch is considered stale. Once stale, this action will leave a comment on the last commit, marking the branch as stale. no90
days-before-branch-deleteNumber of days before a stale branch is removed.no7
operations-per-runMaximum number of stale branches to look at in any run of this action. no10
ignore-unknown-authorsWhether to abort early when a commit author cannot be identified. By default, stop early since this may indicate that the token used to run the action doesn't have the right privileges. Set to true and define a default recipient instead if not a concern. nofalse
default-recipientA string corresponding to the username to be tagged on stale branches from unknown authors no""
ignore-branches-with-open-prsWhether to ignore branches with open pull requests.nofalse
remap-authorsA JSON mapping overriding some commit authors to GitHub usernames. The remapped names will be used in the comments.no
repositoryTarget repository in the format `owner/repo`. Defaults to the repository the workflow is running in. no
namedescription
scanned_branchesTotal number of branches scanned
removed_branchesJSON list of deleted branches
removed_branches_countTotal count of deleted branches
new_stale_branchesJSON list of newly stale branches
new_stale_branches_countTotal count of newly stale branches
existing_stale_branches_countTotal count of existing stale branches