From 4409660f02024b5fc8f1abd30c11d3ed227048d2 Mon Sep 17 00:00:00 2001 From: Ivan Kuchin Date: Mon, 22 Jun 2026 14:58:02 +0200 Subject: [PATCH] prevent failure in flaky spec reporting when running from external PR --- .github/workflows/test-core.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-core.yml b/.github/workflows/test-core.yml index b7a287a1aeb7..e0677dd0c1de 100644 --- a/.github/workflows/test-core.yml +++ b/.github/workflows/test-core.yml @@ -93,6 +93,7 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} PR_NUMBER: ${{ github.event.pull_request.number }} PR_AUTHOR: ${{ github.event.pull_request.user.login }} + PR_HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }} run: | if [ -f tmp/retried_specs.txt ]; then echo "## Flaky specs" >> "$GITHUB_STEP_SUMMARY" @@ -101,7 +102,12 @@ jobs: SPECS="$(cat tmp/retried_specs.txt)" \ envsubst '$SPECS $PR_NUMBER $PR_AUTHOR' \ < .github/flaky-spec-copilot-comment.md > tmp/flaky_comment.md - gh pr comment "$PR_NUMBER" --repo "$GITHUB_REPOSITORY" --body-file tmp/flaky_comment.md + if [ "$PR_HEAD_REPO" != "$GITHUB_REPOSITORY" ]; then + echo "::warning::Flaky specs detected in this PR - see job summary for details" + cat tmp/flaky_comment.md + else + gh pr comment "$PR_NUMBER" --repo "$GITHUB_REPOSITORY" --body-file tmp/flaky_comment.md + fi fi fi - name: Save CI image to cache