diff --git a/.github/workflows/pr-issue-validator-new.yaml b/.github/workflows/pr-issue-validator-new.yaml new file mode 100644 index 0000000..c74eb61 --- /dev/null +++ b/.github/workflows/pr-issue-validator-new.yaml @@ -0,0 +1,27 @@ +- name: Find linked issues + id: find-linked-issues + uses: Ismoh-Games/find-linked-issues@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + repository: ${{ github.repository }} + pull-request-number: ${{ github.event.pull_request.number }} + pull-request-body: ${{ github.event.pull_request.body }} + copy-issues-labels: true # optional + include-closed-issues: true # optional + + # Use the output from the `find-linked-issues` step + - name: Use the output + run: | + echo "is-pull-request-linked-to-issues: ${{ steps.find-linked-issues.outputs.is-pull-request-linked-to-issues }}" + echo "linked-issues: ${{ steps.find-linked-issues.outputs.linked-issues }}" + echo "pull-request-labels: ${{ steps.find-linked-issues.outputs.pull-request-labels }}" + + - name: Conditional step + if: ${{ steps.find-linked-issues.outputs.is-pull-request-linked-to-issues == 'True' }} + run: | + echo "Pull request is linked to issues" + + - name: Another conditional step + if: ${{ steps.find-linked-issues.outputs.is-pull-request-linked-to-issues == 'False' }} + run: | + exit 1