4040 url : ${{ steps.pr.outputs.url }}
4141 state : ${{ steps.pr.outputs.state }}
4242 head_sha : ${{ steps.pr.outputs.head_sha }}
43+ head_branch : ${{ steps.pr.outputs.head_branch }}
44+ head_label : ${{ steps.pr.outputs.head_label }}
4345 head_ref : ${{ steps.pr.outputs.head_ref }}
4446 steps :
4547 - name : Find the originating pull request
@@ -61,16 +63,14 @@ jobs:
6163
6264 // Gather PR-identifying information from the workflow run
6365 const {
64- head: {
65- label: headLabel,
66- ref: headBranch,
67- sha: headSha,
68- repo: {
69- owner: { login: prRepoOwner },
70- name: prRepoName
71- }
66+ head_branch: headBranch,
67+ head_sha: headSha,
68+ head_repository: {
69+ owner: { login: prRepoOwner },
70+ name: prRepoName
7271 }
7372 } = run
73+ const headLabel = `${prRepoOwner}:${headBranch}`
7474
7575 const prIsInternal = owner === prRepoOwner && repo === prRepoName
7676
9999 core.setOutput('url', pullUrl)
100100 core.setOutput('state', pullState)
101101 core.setOutput('head_sha', headSha)
102+ core.setOutput('head_branch', headBranch)
103+ core.setOutput('head_label', headLabel)
102104 core.setOutput('head_ref', headRef)
103105
104106 debug-originating-trigger :
@@ -111,6 +113,8 @@ jobs:
111113 PR_URL : ${{ needs.pr-metadata.outputs.url }}
112114 PR_STATE : ${{ needs.pr-metadata.outputs.state }}
113115 HEAD_SHA : ${{ needs.pr-metadata.outputs.head_sha }}
116+ HEAD_BRANCH : ${{ needs.pr-metadata.outputs.head_branch }}
117+ HEAD_LABEL : ${{ needs.pr-metadata.outputs.head_label }}
114118 HEAD_REF : ${{ needs.pr-metadata.outputs.head_ref }}
115119 BUILD_ACTIONS_RUN_ID : ${{ env.BUILD_ACTIONS_RUN_ID }}
116120 BUILD_ACTIONS_RUN_LOG : ${{ env.BUILD_ACTIONS_RUN_LOG }}
@@ -120,6 +124,8 @@ jobs:
120124 echo " - PR_URL = $PR_URL"
121125 echo " - PR_STATE = $PR_STATE"
122126 echo " - HEAD_SHA = $HEAD_SHA"
127+ echo " - HEAD_BRANCH = $HEAD_BRANCH"
128+ echo " - HEAD_LABEL = $HEAD_LABEL"
123129 echo " - HEAD_REF = $HEAD_REF"
124130 echo " - BUILD_ACTIONS_RUN_ID = $BUILD_ACTIONS_RUN_ID"
125131 echo " - BUILD_ACTIONS_RUN_LOG = $BUILD_ACTIONS_RUN_LOG"
0 commit comments