Skip to content

fixed merge issue

fixed merge issue #64

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.");
}