sichoi42/Cleaning up Stale Branches
Automatically find up stale branches and cleanup them
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| repo-token | Token for the repository. Can be passed in using `{{ secrets.GITHUB_TOKEN }}`. | no | ${{ github.token }} |
| days-before-stale | The age in days before a branch is considered stale. Can be passed in using `30`. | no | 30 |
| days-before-delete | The age in days after a branch is considered stale, before it is deleted. Can be passed in using `7`. | no | 7 |
| ignoring-branches | Comma separated list of branches that should be ignored. Default is `main,master`. | no | main,master |
| ignore-branches-pattern | Pattern of branches that should be ignored. | no | release/* |
| stale-branch-message | The message to post on webhook when a branch is considered stale. | no | These branches were considered stale and will be deleted in a few days. |
| delete-branch-message | The message to post on webhook when a branch is deleted. | no | These branches were deleted because they were stale. |
| dry-run | If true, the action will only log the branches that would be deleted. | no | false |
| use-webhook | If true, the action will send a message to webhook when branches are considered for deletion or deleted. | no | false |
| webhook-url | Webhook URL to send a message when branches are considered for deletion or deleted. Recommend to use `{{ secrets.WEBHOOK_URL }}`. | no | "" |
| webhook-type | The type of webhook to send. Can be `discord` or `slack`. | no | discord |
Outputs
| name | description |
|---|---|
| staled-branches | The list of branches that were considered stale. |
| deleted-branches | The list of branches that were deleted. |