From 71929e8332935310d17e74720d778e57654250e5 Mon Sep 17 00:00:00 2001 From: Nick Bolton Date: Thu, 12 Feb 2026 13:41:43 +0000 Subject: [PATCH] ci: don't fail ci-comment workflow on no PR Can easily happen on force push --- .github/workflows/ci-comment.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-comment.yml b/.github/workflows/ci-comment.yml index 0db22bea4..05b813e5d 100644 --- a/.github/workflows/ci-comment.yml +++ b/.github/workflows/ci-comment.yml @@ -57,10 +57,11 @@ jobs: console.log("Found PR:", pr.number); return pr.number; } else { - core.setFailed("PR not found"); + core.warning("PR not found for SHA (maybe removed by force push)"); } - name: Merge summaries + if: steps.get-pr-number.outputs.result id: summary run: | ls -R @@ -88,7 +89,7 @@ jobs: } >> $GITHUB_OUTPUT - name: Set PR comment - if: steps.summary.outputs.message + if: steps.get-pr-number.outputs.result && steps.summary.outputs.message uses: marocchino/sticky-pull-request-comment@v2 with: number: ${{ steps.get-pr-number.outputs.result }} @@ -96,7 +97,7 @@ jobs: message: ${{ steps.summary.outputs.message }} - name: Delete PR comment - if: ${{ !steps.summary.outputs.message }} + if: ${{ steps.get-pr-number.outputs.result && !steps.summary.outputs.message }} uses: marocchino/sticky-pull-request-comment@v2 with: number: ${{ steps.get-pr-number.outputs.result }}