chore(release): version packages #18
Workflow file for this run
This file contains hidden or 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 Check | |
| on: | |
| pull_request: | |
| types: [opened, edited, reopened] | |
| jobs: | |
| check-issue-reference: | |
| name: Check Issue Reference | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check for Issue Link | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const body = context.payload.pull_request.body || ''; | |
| // Match patterns: Closes #123, Fixes #123, Resolves #123, or just #123 | |
| const issuePattern = /(close[sd]?|fix(e[sd])?|resolve[sd]?)\s*#\d+|#\d+/i; | |
| if (!issuePattern.test(body)) { | |
| core.setFailed( | |
| 'PR must reference an Issue.\n\n' + | |
| 'Please add one of the following to your PR description:\n' + | |
| ' - Closes #<issue-number>\n' + | |
| ' - Fixes #<issue-number>\n' + | |
| ' - Resolves #<issue-number>\n\n' + | |
| 'If no issue exists, please create one first: https://github.com/' + | |
| context.repo.owner + '/' + context.repo.repo + '/issues/new/choose' | |
| ); | |
| } |