Skip to content

Commit c8a8773

Browse files
fix: make dispatch more resilient
Use FARM_PAT or GITHUB_TOKEN and handle missing token gracefully. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
1 parent 4983ff9 commit c8a8773

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/inbox-steward.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -375,9 +375,9 @@ jobs:
375375

376376
- name: Send dispatch to Hypatia
377377
env:
378-
GH_TOKEN: ${{ secrets.HYPATIA_DISPATCH_PAT }}
378+
GH_TOKEN: ${{ secrets.FARM_PAT || secrets.GITHUB_TOKEN }}
379379
PR_COUNT: ${{ needs.identify-passed-prs.outputs.pr_count }}
380-
VALIDATED_JSON: ${{ needs.validate-prs.outputs.validated_prs }}
380+
VALIDATED_JSON: ${{ needs.validate-prs.outputs.validated_prs || '[]' }}
381381
MERGED_COUNT: ${{ needs.auto-merge-prs.outputs.merged_count || '0' }}
382382
run: |
383383
set -euo pipefail
@@ -408,12 +408,13 @@ jobs:
408408
echo "Dispatching to Hypatia: $PAYLOAD"
409409
410410
# Send to hypatia repo
411-
if gh api -X POST \
411+
if [ -n "$GH_TOKEN" ] && gh api -X POST \
412412
"/repos/hyperpolymath/hypatia/dispatches" \
413413
--input - <<<"$PAYLOAD" >/dev/null 2>&1; then
414414
echo "✅ Successfully dispatched to Hypatia"
415415
else
416-
echo "::warning::Failed to dispatch to Hypatia"
416+
echo "::warning::Failed to dispatch to Hypatia (missing token or network error)"
417+
echo "Continuing without dispatch..."
417418
fi
418419
419420
# Job 5: Summary

0 commit comments

Comments
 (0)