Skip to content

Commit b788405

Browse files
committed
chore(bot): rename inactivity workflow and add dry-run input
Signed-off-by: Akshat Kumar <akshat230405@gmail.com>
1 parent 046086d commit b788405

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/bot-inactivity-unassign-phase1.yml renamed to .github/workflows/bot-inactivity-unassign-phase.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ on:
44
schedule:
55
- cron: "0 12 * * *"
66
workflow_dispatch:
7+
inputs:
8+
dry_run:
9+
description: "Run in dry-run mode (no unassign / close / comment)"
10+
required: true
11+
default: "true"
12+
type: boolean
713

814
permissions:
915
contents: read
@@ -28,5 +34,8 @@ jobs:
2834
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2935
REPO: ${{ github.repository }}
3036
DAYS: 21
31-
DRY_RUN: 0
37+
# Default behaviour:
38+
# - schedule: DRY_RUN=0 (real actions)
39+
# - workflow_dispatch: DRY_RUN comes from the "dry_run" input (true → 1, false → 0)
40+
DRY_RUN: ${{ github.event_name == 'workflow_dispatch' && (github.event.inputs.dry_run == 'true' && '1' || '0') || '0' }}
3241
run: bash .github/scripts/inactivity_unassign.sh

0 commit comments

Comments
 (0)