Skip to content

build(npm): bump the visor-client group in /src/ansys/visor/visor-client with 24 updates #172

build(npm): bump the visor-client group in /src/ansys/visor/visor-client with 24 updates

build(npm): bump the visor-client group in /src/ansys/visor/visor-client with 24 updates #172

name: Check Linked Issue
on:
pull_request:
types: [opened, edited, reopened, synchronize]
jobs:
check-issue-link:
runs-on: ubuntu-latest
permissions:
pull-requests: write
issues: read
steps:
- name: Check if PR is linked to an issue
uses: actions/github-script@v7
with:
script: |
const prBody = context.payload.pull_request.body;
const issueRegex = /(close[sd]?|fix(e[sd])?|resolve[sd]?|address(e[sd])?)\s+#\d+/i;
if (!prBody || !issueRegex.test(prBody)) {
core.setFailed("❌ Pull request must be linked to an issue.");
shouldFail = true;
} else {
console.log("✅ Pull request is correctly linked to an issue.");
}