You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+45-9Lines changed: 45 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,19 +17,21 @@ A branch must meet all the following criteria to be deemed abandoned and safe to
17
17
* Must NOT be the base of an open pull request of another branch. The base of a pull request is the branch you told
18
18
GitHub you want to merge your pull request into.
19
19
* Must NOT be in an optional list of branches to ignore
20
+
* Must match one of the given branch prefixes (optional)
20
21
* Must be older than a given amount of days
21
22
22
23
## Inputs
23
24
24
25
`* mandatory`
25
26
26
-
| Name | Description | Example |
27
-
| ------------- | ------------- | ------------- |
28
-
| `ignore_branches` | Comma-separated list of branches to ignore and never delete. You don't need to add your protected branches here. | `foo,bar`
29
-
| `last_commit_age_days` | How old in days must be the last commit into the branch for the branch to be deleted. Default: `60` | `90`
30
-
| `dry_run`* | Whether we're actually deleting branches at all. Possible values: `yes, no` (case sensitive). Default: `yes` | `no`
31
-
| `github_token`* | The github token to use on requests to the github api. You can use the one github actions provide | `${{ github.token }}`
32
-
| `github_base_url` | The github API's base url. You only need to override this when using Github Enterprise on a different domain. Default: `https://api.github.com` | `https://github.mycompany.com/api/v3`
|`github_token`*|**Required.** The github token to use on requests to the github api. You can use the one github actions provide. |`${{ github.token }}`|
30
+
|`last_commit_age_days`| How old in days must be the last commit into the branch for the branch to be deleted. **Default:**`60`|`90`|
31
+
|`ignore_branches`| Comma-separated list of branches to ignore and never delete. You don't need to add your protected branches here. **Default:**`null`|`foo,bar`|
32
+
|`allowed_prefixes`| Comma-separated list of prefixes a branch must match to be deleted. **Default:**`null`|`feature/,bugfix/`|
33
+
|`dry_run`| Whether we're actually deleting branches at all. **Possible values:**`yes, no` (case sensitive). **Default:**`yes`|`no`|
34
+
|`github_base_url`| The github API's base url. You only need to override this when using Github Enterprise on a different domain. **Default:**`https://api.github.com`|`https://github.mycompany.com/api/v3`|
33
35
34
36
### Note: dry run
35
37
@@ -40,7 +42,7 @@ correctly before setting `dry_run` to `no`
40
42
## Example
41
43
42
44
The following workflow will run on a schedule (daily at 00:00) and will delete all abandoned branches older than 100
0 commit comments