From 4f30d6308ddc1df7fc6a7912e6f28aa16055a7c1 Mon Sep 17 00:00:00 2001 From: goat <16760685+goaaats@users.noreply.github.com> Date: Thu, 16 Jan 2025 21:41:40 +0100 Subject: [PATCH] ci: remove unused PR data script --- .github/workflows/push.yml | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index b4183536c3..d2f314c40e 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -10,42 +10,6 @@ jobs: if: github.ref == 'refs/heads/main' runs-on: ubuntu-latest steps: - - name: Get Pull Request data - uses: actions/github-script@v7 - id: get_pr_data - with: - script: | - const pr = ( - await github.rest.repos.listPullRequestsAssociatedWithCommit({ - commit_sha: context.sha, - owner: context.repo.owner, - repo: context.repo.repo, - }) - ).data[0]; - - const reviews = ( - await github.rest.pulls.listReviews({ - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: pr.number, - }) - ).data; - - // Filter reviews for approved ones - const approvedReviews = reviews.filter(review => review.state === 'APPROVED'); - - if (approvedReviews.length === 0) { - throw new Error("Pull request has no approved reviews."); - } - - // Setting the output explicitly - return { - number: pr.number, - title: pr.title, - first_approved_reviewer: approvedReviews[0].user.login - }; - outputs: result - - name: Checkout manifests uses: actions/checkout@v3 with: @@ -99,7 +63,6 @@ jobs: EXTENDED_IMAGE_LINK: ${{ secrets.EXTENDED_IMAGE_LINK }} PLOGON_SECRETS_PK: ${{ secrets.PLOGON_SECRETS_PK }} PLOGON_SECRETS_PK_PASSWORD: ${{ secrets.PLOGON_SECRETS_PK_PASSWORD }} - PLOGON_ACTOR: ${{ fromJson(steps.get_pr_data.outputs.result).first_approved_reviewer }} XLWEB_KEY: ${{ secrets.XLWEB_KEY }} PLOGON_S3_HISTORY_BUCKET: ${{ vars.PLOGON_S3_HISTORY_BUCKET }} PLOGON_S3_DIFFS_BUCKET: ${{ vars.PLOGON_S3_DIFFS_BUCKET }}