File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -891,15 +891,16 @@ jobs:
891891 const targetRepo = process.env.TARGET_REPO;
892892 // Use the ref for pull requests because the head sha is brittle (github does some extra dance where it merges in master).
893893 const publicRef = (context.eventName === 'pull_request') ? context.payload.pull_request.head.ref : context.sha;
894+ const publicPrNumber = context.payload.pull_request?.number ?? context.payload.inputs?.pr_number;
894895 const preDispatch = new Date().toISOString();
895-
896+
896897 // Dispatch the workflow in the target repository
897898 await github.rest.actions.createWorkflowDispatch({
898899 owner: targetOwner,
899900 repo: targetRepo,
900901 workflow_id: workflowId,
901902 ref: targetRef,
902- inputs : { public_ref: publicRef }
903+ inputs: { public_ref: publicRef, public_pr_number: String(publicPrNumber) }
903904 });
904905
905906 const sleep = (ms) => new Promise(r => setTimeout(r, ms));
You can’t perform that action at this time.
0 commit comments