Skip to content

On PR open

On PR open #36

Workflow file for this run

name: On PR open
on:
workflow_run:
workflows: ["Record PR details"]
types:
- completed
jobs:
get_pr_details:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
uses: ./.github/workflows/reusable_export_pr_details.yml
with:
record_pr_workflow_id: ${{ github.event.workflow_run.id }}
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
check_related_issue:
needs: get_pr_details
runs-on: ubuntu-latest
steps:
- name: Debug outputs
run: echo "Outputs ${{ toJSON(needs.get_pr_details.outputs) }}"
- uses: actions/checkout@v3
- name: "Ensure related issue is present"
uses: actions/github-script@v6
env:
PR_ACTION: ${{ needs.get_pr_details.outputs.prAction }}
PR_AUTHOR: ${{ needs.get_pr_details.outputs.prAuthor }}
PR_BODY: ${{ needs.get_pr_details.outputs.prBody }}
PR_NUMBER: ${{ needs.get_pr_details.outputs.prNumber }}
PR_TITLE: ${{ needs.get_pr_details.outputs.prTitle }}
PR_IS_MERGED: ${{ needs.get_pr_details.outputs.prIsMerged }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const script = require('.github/scripts/label_missing_related_issue.js')
await script({github, context, core})