We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0468876 commit 67e5f0eCopy full SHA for 67e5f0e
.github/workflows/time-based-pr-approvals.yml
@@ -18,16 +18,19 @@ jobs:
18
repo: context.repo.repo,
19
issue_number: prNumber
20
});
21
- return labels.map(label => label.name);
+ core.setOutput("labels", labels.map(label => label.name).join(','));
22
23
- name: Check Approval Time
24
run: |
25
EMERGENCY_LABEL="emergency-approval"
26
- PR_LABELS="${{ steps.labels.outputs.result }}"
+ PR_LABELS="${{ steps.labels.outputs.labels }}"
27
CURRENT_HOUR=$(date -u +%H)
28
ALLOWED_START=9 # 9 AM UTC
29
ALLOWED_END=18 # 6 PM UTC
30
31
+ echo "PR Labels: $PR_LABELS"
32
+ echo "Current UTC Hour: $CURRENT_HOUR"
33
+
34
if [[ "$PR_LABELS" == *"$EMERGENCY_LABEL"* ]]; then
35
echo "🚨 Emergency approval detected! Bypassing time restriction."
36
exit 0
0 commit comments