diff --git a/.github/workflows/verify-linked-issue.yaml b/.github/workflows/verify-linked-issue.yaml deleted file mode 100644 index a7801a6..0000000 --- a/.github/workflows/verify-linked-issue.yaml +++ /dev/null @@ -1,50 +0,0 @@ -# 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}".`); - }