damccorm commented on code in PR #27782:
URL: https://github.com/apache/beam/pull/27782#discussion_r1281301058


##########
.github/workflows/beam_PreCommit_Website_Stage_GCS.yml:
##########
@@ -78,25 +78,8 @@ jobs:
           github_token: ${{ secrets.GITHUB_TOKEN }}
           github_job: ${{ github.job }}
           github_current_run_id: ${{ github.run_id }}
-      - name: Find Current Pull Request
-        uses: actions/github-script@v6
-        id: findPr
-        with:
-          script: |
-            // Based on https://github.com/jwalton/gh-find-current-pr
-            const result = await 
github.rest.repos.listPullRequestsAssociatedWithCommit({
-                owner: context.repo.owner,
-                repo: context.repo.repo,
-                commit_sha: '${{ github.event.pull_request.head.sha || 
github.sha }}',
-            });
-            console.log(result);
-            const pr =
-                result.data.find((el) => {
-                    return context.payload.ref === `refs/heads/${el.head.ref}`;
-                }) || result.data[0];
-            const prNumber = (pr && pr.number) || context.event.issue.number;
-            console.log(prNumber);
-            core.setOutput('ghprbPullId', prNumber);
+      - name: Echo PR number
+        run: echo "ghprbPullId=${{ github.event.pull_request.number || 
github.event.issue.number }}" >> $GITHUB_ENV

Review Comment:
   Oh yeah, I think this should just work; any idea on why we needed the action 
initially? I figured it was because the payload wasn't correct in some cases on 
PR update



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to