From 785293c000cbb84c4009a960b905b997c2c58660 Mon Sep 17 00:00:00 2001 From: eleanorjboyd Date: Mon, 16 Dec 2024 16:00:01 -0800 Subject: [PATCH] add support for link --- .github/workflows/pr-file-check.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr-file-check.yml b/.github/workflows/pr-file-check.yml index 23ce4894c766..79cd0b2cd957 100644 --- a/.github/workflows/pr-file-check.yml +++ b/.github/workflows/pr-file-check.yml @@ -3,11 +3,9 @@ name: PR files on: pull_request: types: - # On by default if you specify no types. - 'opened' - 'reopened' - 'synchronize' - # For `skip-label` only. - 'labeled' - 'unlabeled' @@ -50,8 +48,8 @@ jobs: const labels = context.payload.pull_request.labels.map(label => label.name); console.log('PR Body:', context.payload.pull_request.body); if (!labels.includes('skip-issue-check')) { - const issueNumber = context.payload.pull_request.body.match(/#\d+/); - if (!issueNumber) { + const issueLink = context.payload.pull_request.body.match(/https:\/\/github\.com\/\S+\/issues\/\d+/); + if (!issueLink) { core.setFailed('No associated issue found in the PR description.'); } }