From 44aff6bb275e17d10195465ed48d0109597e8727 Mon Sep 17 00:00:00 2001 From: xtqqczze <45661989+xtqqczze@users.noreply.github.com> Date: Mon, 13 Apr 2026 10:41:23 +0100 Subject: [PATCH] CI/GnuComment: add safeguards --- .github/workflows/GnuComment.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/GnuComment.yml b/.github/workflows/GnuComment.yml index 3dc2a46d9..6813514a7 100644 --- a/.github/workflows/GnuComment.yml +++ b/.github/workflows/GnuComment.yml @@ -50,7 +50,15 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} script: | const fs = require('fs'); + if (!fs.existsSync('./NR') || !fs.existsSync('./result.txt')) { + core.info("No GNU comment payload to post."); + return; + } const issue_number = Number(fs.readFileSync('./NR')); + if (!issue_number) { + core.info('No PR number; skipping.'); + return; + } const content = fs.readFileSync('./result.txt').toString(); const marker = '';