Skip to content

Commit 67e5f0e

Browse files
Update time-based-pr-approvals.yml
1 parent 0468876 commit 67e5f0e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/time-based-pr-approvals.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,19 @@ jobs:
1818
repo: context.repo.repo,
1919
issue_number: prNumber
2020
});
21-
return labels.map(label => label.name);
21+
core.setOutput("labels", labels.map(label => label.name).join(','));
2222
2323
- name: Check Approval Time
2424
run: |
2525
EMERGENCY_LABEL="emergency-approval"
26-
PR_LABELS="${{ steps.labels.outputs.result }}"
26+
PR_LABELS="${{ steps.labels.outputs.labels }}"
2727
CURRENT_HOUR=$(date -u +%H)
2828
ALLOWED_START=9 # 9 AM UTC
2929
ALLOWED_END=18 # 6 PM UTC
3030
31+
echo "PR Labels: $PR_LABELS"
32+
echo "Current UTC Hour: $CURRENT_HOUR"
33+
3134
if [[ "$PR_LABELS" == *"$EMERGENCY_LABEL"* ]]; then
3235
echo "🚨 Emergency approval detected! Bypassing time restriction."
3336
exit 0

0 commit comments

Comments
 (0)