From c32b8aee03fddf49507be56bbce6797bec686409 Mon Sep 17 00:00:00 2001 From: pbio <10051819+paulbalaji@users.noreply.github.com> Date: Mon, 2 Feb 2026 15:05:45 +0000 Subject: [PATCH 1/3] fix: allow check-warp-deploy to run on fork PRs Skip GitHub App token generation for fork PRs since they don't have access to secrets. Checks still run, just no PR comment posted. Co-Authored-By: Claude Opus 4.5 --- .github/workflows/check-warp-deploy.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-warp-deploy.yaml b/.github/workflows/check-warp-deploy.yaml index 472156f18..728b3e10b 100644 --- a/.github/workflows/check-warp-deploy.yaml +++ b/.github/workflows/check-warp-deploy.yaml @@ -9,8 +9,10 @@ jobs: pull-requests: write runs-on: ubuntu-latest steps: + # Skip token generation for fork PRs (they don't have access to secrets) - name: Generate GitHub App Token id: generate-token + if: github.event.pull_request.head.repo.full_name == github.repository uses: actions/create-github-app-token@v2 with: app-id: ${{ secrets.HYPER_GONK_APP_ID }} @@ -29,7 +31,8 @@ jobs: - name: Check Warp Deploy env: - PR_NUMBER: ${{ github.event.pull_request.number }} + # Only set PR_NUMBER for non-fork PRs (enables PR commenting) + PR_NUMBER: ${{ github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.number || '' }} GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} run: | ./scripts/check-warp-deploy.sh ${{ steps.determine-base-sha.outputs.base_sha }} ${{ steps.determine-base-sha.outputs.current_sha }} From 4259fb85e65486ae2b3dad8d3fa5989df55b4fb8 Mon Sep 17 00:00:00 2001 From: pbio <10051819+paulbalaji@users.noreply.github.com> Date: Mon, 2 Feb 2026 15:07:00 +0000 Subject: [PATCH 2/3] feat: write summary to GITHUB_STEP_SUMMARY for fork PRs Always write the check summary to the workflow run page so it's visible even for fork PRs that can't post PR comments. Co-Authored-By: Claude Opus 4.5 --- scripts/check-warp-deploy.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/scripts/check-warp-deploy.sh b/scripts/check-warp-deploy.sh index 1a0a39f9f..96a270e63 100755 --- a/scripts/check-warp-deploy.sh +++ b/scripts/check-warp-deploy.sh @@ -101,14 +101,19 @@ for WARP_ROUTE_ID in $WARP_ROUTE_IDS; do JOB_SUMMARY+="| $WARP_ROUTE_ID | $ONCHAIN_STATUS | $CONFIG_SYNC_STATUS |\n" done -# Output the job summary to a file if PR_NUMBER is set +# Add readable timestamp to the job summary +TIMESTAMP=$(date +"%Y-%m-%d %H:%M:%S") +JOB_SUMMARY+="\n*Last updated: $TIMESTAMP UTC*\n" + +# Always write to GitHub Actions job summary (visible on workflow run page) +if [ -n "$GITHUB_STEP_SUMMARY" ]; then + echo -e "$JOB_SUMMARY" >> "$GITHUB_STEP_SUMMARY" +fi + +# Post PR comment if PR_NUMBER is set (non-fork PRs only) if [ -n "$PR_NUMBER" ]; then echo "Writing job summary to check_warp_deploy_summary.txt" - # Add readable timestamp to the job summary - TIMESTAMP=$(date +"%Y-%m-%d %H:%M:%S") - JOB_SUMMARY+="\n*Last updated: $TIMESTAMP UTC*\n" - echo -e "$JOB_SUMMARY" > check_warp_deploy_summary.txt # Use a comment-tag to allow overwriting in subsequent runs From 3b98930be4669cfed4017fc9ae4d861202d5e4fd Mon Sep 17 00:00:00 2001 From: pbio <10051819+paulbalaji@users.noreply.github.com> Date: Mon, 2 Feb 2026 15:08:06 +0000 Subject: [PATCH 3/3] chore: add changeset Co-Authored-By: Claude Opus 4.5 --- .changeset/fork-pr-warp-check.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/fork-pr-warp-check.md diff --git a/.changeset/fork-pr-warp-check.md b/.changeset/fork-pr-warp-check.md new file mode 100644 index 000000000..f80451bde --- /dev/null +++ b/.changeset/fork-pr-warp-check.md @@ -0,0 +1,5 @@ +--- +'@hyperlane-xyz/registry': patch +--- + +Fix check-warp-deploy workflow for fork PRs