Skip to content

Commit

Permalink
add support for link
Browse files Browse the repository at this point in the history
  • Loading branch information
eleanorjboyd committed Dec 17, 2024
1 parent b39ca7d commit 785293c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/pr-file-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down Expand Up @@ -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.');
}
}

0 comments on commit 785293c

Please sign in to comment.