From 161aa6e9eab6c70d8b586e86b06446a35a81caf0 Mon Sep 17 00:00:00 2001 From: Alex Lende Date: Tue, 30 Jul 2024 19:24:39 -0500 Subject: [PATCH] Try to simplify for comparing forks --- .github/workflows/validate-schemas.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/validate-schemas.yml b/.github/workflows/validate-schemas.yml index c833b59..42c6513 100644 --- a/.github/workflows/validate-schemas.yml +++ b/.github/workflows/validate-schemas.yml @@ -22,13 +22,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 with: - repository: ${{ github.event.pull_request.head.repo.full_name }} - ref: ${{ github.event.pull_request.head.ref }} - - - name: Fetch compare - run: | - git remote add upstream ${{ github.event.pull_request.base.repo.repositoryUrl }} - git fetch --no-write-fetch-head --depth=1 upstream ${{ github.event.pull_request.base.ref }} + fetch-depth: 2 - name: Setup Node uses: actions/setup-node@v4 @@ -40,4 +34,4 @@ jobs: run: npm ci - name: Validate JSON files - run: node theme-utils.mjs validate-schema $(git diff --name-only upstream/${{ github.event.pull_request.base.ref }} ${{ github.event.pull_request.head.ref }} -- ${{ env.PR_PATHS }} | tr '\n' ' ') + run: node theme-utils.mjs validate-schema $(git diff --name-only origin/${{ github.base_ref }}...HEAD -- ${{ env.PR_PATHS }} | tr '\n' ' ')