Skip to content

Commit 5f23dd6

Browse files
feat(cleanup-branches): update input requirements (#1398)
Modify dry run logic to disable dry-run by default Remove input requirements and modify defaults
1 parent 0c0ff2a commit 5f23dd6

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

actions/cleanup-branches/action.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,13 @@ description: |
44
Protected branches are excluded as well.
55
inputs:
66
dry-run:
7-
default: "true"
8-
required: true
7+
default: "false"
98
description: "If 'true', then the action will print branches to be deleted, but will not delete them"
109
token:
1110
default: ${{ github.token }}
12-
required: true
1311
description: "GitHub token used to authenticate with `gh`. Requires permission to query for protected branches and delete branches (contents: write) and pull requests (pull_requests: read)"
1412
max-date:
15-
default: "2 weeks ago"
16-
required: false
13+
default: "1 month ago"
1714
description: |
1815
Value provided to `date -d={}. From `man date`: "The --date=STRING is a mostly free format human readable date string such as "Sun, 29 Feb 2004 16:21:42 -0800" or "2004-02-29 16:21:42" or even "next Thursday". A date string may
1916
contain items indicating calendar date, time of day, time zone, day of week, relative time, relative date, and numbers. An empty string indicates the beginning of the day. The
@@ -73,7 +70,7 @@ runs:
7370
done
7471
- name: Delete branches (dry run)
7572
shell: bash
76-
if: ${{ inputs.dry-run != 'false' }}
73+
if: ${{ inputs.dry-run == 'true' }}
7774
run: |
7875
if [[ ! -s branches.txt ]]; then
7976
echo "🟢 No branches marked for deletion."

0 commit comments

Comments
 (0)