| github-token | PAT for GitHub API authentication. | no | ${{ github.token }} |
| dry-run | Flag that prevents this action from doing any modification to the repository.
| no | false |
| exempt-organization | Name of a GitHub organization. Branches for which the latest committer belongs to this organization will be exempt from cleanup.
| no | — |
| restrict-branches-regex | Regular expression defining branch names that are eligible for cleanup. Defaults to all.
| no | — |
| exempt-branches-regex | Regular 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-branches | Whether protected branches are exempted | no | true |
| exempt-authors-regex | Regular expression defining authors who are exempt from cleanup. By default, no author is exempted.
| no | — |
| stale-branch-message | Template 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-stale | Number 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.
| no | 90 |
| days-before-branch-delete | Number of days before a stale branch is removed. | no | 7 |
| operations-per-run | Maximum number of stale branches to look at in any run of this action.
| no | 10 |
| ignore-unknown-authors | Whether 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.
| no | false |
| default-recipient | A string corresponding to the username to be tagged on stale branches from unknown authors
| no | "" |
| ignore-branches-with-open-prs | Whether to ignore branches with open pull requests. | no | false |
| remap-authors | A JSON mapping overriding some commit authors to GitHub usernames. The remapped names will be used in the comments. | no | — |
| repository | Target repository in the format `owner/repo`. Defaults to the repository the workflow is running in.
| no | — |