fixed merge issue #60
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PR Issue Link Checker | |
on: | |
pull_request: | |
types: [opened, edited, reopened] | |
jobs: | |
check-issue-link: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check for Issue Link in PR | |
uses: actions/github-script@v4 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
const issuePattern = /#(\d+)/; | |
const prBody = context.payload.pull_request.body; | |
if (!issuePattern.test(prBody)) { | |
core.setFailed("PR must reference an issue."); | |
} |