From dad73b11e5576b417c50131d417fb896311e3fd6 Mon Sep 17 00:00:00 2001 From: Rhys Arkins Date: Fri, 11 Oct 2024 12:31:07 +0200 Subject: [PATCH 1/3] chore(workflows): add repository --- .github/workflows/undesirable-test-additions.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/undesirable-test-additions.yaml b/.github/workflows/undesirable-test-additions.yaml index 54f1748ec472ff..fec6e3355af78b 100644 --- a/.github/workflows/undesirable-test-additions.yaml +++ b/.github/workflows/undesirable-test-additions.yaml @@ -15,6 +15,7 @@ jobs: fetch-depth: 0 # Fetch all history for comparison sparse-checkout: true ref: ${{ github.event.pull_request.head.ref }} + repository: ${{ github.event.pull_request.head.repo.full_name }} - name: Check for undesirable code run: | #!/bin/bash From 86bfa2479bf0fae251fef78e1214e331a5dc7c88 Mon Sep 17 00:00:00 2001 From: Rhys Arkins Date: Fri, 11 Oct 2024 12:46:30 +0200 Subject: [PATCH 2/3] Update undesirable-test-additions.yaml --- .github/workflows/undesirable-test-additions.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/undesirable-test-additions.yaml b/.github/workflows/undesirable-test-additions.yaml index fec6e3355af78b..069a390c01fb48 100644 --- a/.github/workflows/undesirable-test-additions.yaml +++ b/.github/workflows/undesirable-test-additions.yaml @@ -22,11 +22,10 @@ jobs: set -e echo "### Fetching base branch for comparison..." - git fetch origin ${{ github.event.pull_request.base.ref }} + git fetch remote ${{ github.event.pull_request.base.ref }} - BASE_BRANCH=origin/${{ github.event.pull_request.base.ref }} + BASE_BRANCH=${{ github.event.pull_request.base.ref }} echo "Base branch is: $BASE_BRANCH" - echo "Current HEAD is: $(git rev-parse HEAD)" BASE_BRANCH_REF=${{ github.event.pull_request.base.sha }} echo "Base branch ref for this PR is: $BASE_BRANCH_REF" @@ -45,7 +44,7 @@ jobs: fi echo "### Calculating file changes in '__fixtures__' directories..." - git diff --name-status $BASE_BRANCH..HEAD > diff_name_status.txt + git diff --name-status $BASE_BRANCH_REF > diff_name_status.txt echo "### Processing added files in '__fixtures__' directories..." ADDED_FIXTURES=$(grep '^A' diff_name_status.txt | awk '{print $2}' | grep '/__fixtures__/' || true) From 3dba76ce10bac5b4b996dad77d1364d6c7c98a44 Mon Sep 17 00:00:00 2001 From: Rhys Arkins Date: Fri, 11 Oct 2024 12:48:00 +0200 Subject: [PATCH 3/3] Update undesirable-test-additions.yaml --- .github/workflows/undesirable-test-additions.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/undesirable-test-additions.yaml b/.github/workflows/undesirable-test-additions.yaml index 069a390c01fb48..ea52ab40185999 100644 --- a/.github/workflows/undesirable-test-additions.yaml +++ b/.github/workflows/undesirable-test-additions.yaml @@ -21,9 +21,6 @@ jobs: #!/bin/bash set -e - echo "### Fetching base branch for comparison..." - git fetch remote ${{ github.event.pull_request.base.ref }} - BASE_BRANCH=${{ github.event.pull_request.base.ref }} echo "Base branch is: $BASE_BRANCH" BASE_BRANCH_REF=${{ github.event.pull_request.base.sha }}