64176: Added table for enums #11
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
| # This repository is public and cannot call reusable workflows from a private | |
| # repository (regulaforensics/reusable-workflows). The logic below is a local | |
| # copy that mirrors the reusable workflow exactly. SHA pins are kept up-to-date | |
| # by Renovate (see renovate.json). | |
| name: Verify Issue | |
| on: | |
| pull_request: | |
| types: [edited, synchronize, opened, reopened] | |
| jobs: | |
| verify_linked_issue: | |
| runs-on: ubuntu-latest | |
| name: PR has a linked issue. | |
| steps: | |
| - name: Verify Linked Issue | |
| uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 | |
| with: | |
| script: | | |
| const skipBranchPattern = ''; | |
| const issueUrlPattern = 'https://redmine.regulaforensics.com/'; | |
| const clickupUrlPattern = 'https://app.clickup.com/'; | |
| const pr = context.payload.pull_request; | |
| if (skipBranchPattern && pr.head.ref.startsWith(skipBranchPattern)) { | |
| console.log(`Skipping verification — branch "${pr.head.ref}" matches skip pattern "${skipBranchPattern}".`); | |
| return; | |
| } | |
| if (!pr.body) { | |
| console.log("No Linked Issue Found!"); | |
| core.setFailed('No linked issue found in the pull request description.'); | |
| return; | |
| } | |
| const hasRedmineIssue = issueUrlPattern && pr.body.includes(issueUrlPattern); | |
| const hasClickupIssue = clickupUrlPattern && pr.body.includes(clickupUrlPattern); | |
| if (!hasRedmineIssue && !hasClickupIssue) { | |
| console.log("No Linked Issue Found!"); | |
| core.setFailed('No linked issue found in the pull request description.'); | |
| return; | |
| } | |
| if (hasRedmineIssue) { | |
| console.log(`Linked issue found matching pattern "${issueUrlPattern}".`); | |
| } | |
| if (hasClickupIssue) { | |
| console.log(`Linked issue found matching pattern "${clickupUrlPattern}".`); | |
| } |