diff --git a/.github/workflows/pr-file-check.yml b/.github/workflows/pr-file-check.yml index fcdf91b4f64b..b5ba2fe1f109 100644 --- a/.github/workflows/pr-file-check.yml +++ b/.github/workflows/pr-file-check.yml @@ -47,7 +47,8 @@ jobs: script: | const labels = context.payload.pull_request.labels.map(label => label.name); if (!labels.includes('skip-issue-check')) { - const issueLink = context.payload.pull_request.body.match(/https:\/\/github\.com\/\S+\/issues\/\d+/); + const prBody = context.payload.pull_request.body || ''; + const issueLink = prBody.match(/https:\/\/github\.com\/\S+\/issues\/\d+/); if (!issueLink) { core.setFailed('No associated issue found in the PR description.'); }