Skip to content

Commit 785293c

Browse files
committed
add support for link
1 parent b39ca7d commit 785293c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

.github/workflows/pr-file-check.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@ name: PR files
33
on:
44
pull_request:
55
types:
6-
# On by default if you specify no types.
76
- 'opened'
87
- 'reopened'
98
- 'synchronize'
10-
# For `skip-label` only.
119
- 'labeled'
1210
- 'unlabeled'
1311

@@ -50,8 +48,8 @@ jobs:
5048
const labels = context.payload.pull_request.labels.map(label => label.name);
5149
console.log('PR Body:', context.payload.pull_request.body);
5250
if (!labels.includes('skip-issue-check')) {
53-
const issueNumber = context.payload.pull_request.body.match(/#\d+/);
54-
if (!issueNumber) {
51+
const issueLink = context.payload.pull_request.body.match(/https:\/\/github\.com\/\S+\/issues\/\d+/);
52+
if (!issueLink) {
5553
core.setFailed('No associated issue found in the PR description.');
5654
}
5755
}

0 commit comments

Comments
 (0)