From 3c44499de65decf7ed76a938e1909b0dc2be0926 Mon Sep 17 00:00:00 2001 From: aholstrup1 Date: Mon, 1 Jul 2024 16:22:59 +0200 Subject: [PATCH] new ref --- .../AppSource App/.github/workflows/PullRequestHandler.yaml | 4 ++-- .../.github/workflows/PullRequestHandler.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Templates/AppSource App/.github/workflows/PullRequestHandler.yaml b/Templates/AppSource App/.github/workflows/PullRequestHandler.yaml index 682a399fc..f7b7edabd 100644 --- a/Templates/AppSource App/.github/workflows/PullRequestHandler.yaml +++ b/Templates/AppSource App/.github/workflows/PullRequestHandler.yaml @@ -53,7 +53,7 @@ jobs: uses: actions/checkout@v4 with: lfs: true - ref: ${{ github.event.pull_request.merge_commit_sha }} + ref: ${{ github.event_name == 'pull_request' && github.sha || format('refs/pull/${0}/merge', github.event.pull_request.number) }} - name: Initialize the workflow id: init @@ -93,7 +93,7 @@ jobs: with: shell: ${{ needs.Initialization.outputs.githubRunnerShell }} runsOn: ${{ needs.Initialization.outputs.githubRunner }} - checkoutRef: ${{ github.event.pull_request.merge_commit_sha }} + checkoutRef: ${{ github.event_name == 'pull_request' && github.sha || format('refs/pull/${0}/merge', github.event.pull_request.number) }} parentTelemetryScopeJson: ${{ needs.Initialization.outputs.telemetryScopeJson }} project: ${{ matrix.project }} projectName: ${{ matrix.projectName }} diff --git a/Templates/Per Tenant Extension/.github/workflows/PullRequestHandler.yaml b/Templates/Per Tenant Extension/.github/workflows/PullRequestHandler.yaml index 682a399fc..f7b7edabd 100644 --- a/Templates/Per Tenant Extension/.github/workflows/PullRequestHandler.yaml +++ b/Templates/Per Tenant Extension/.github/workflows/PullRequestHandler.yaml @@ -53,7 +53,7 @@ jobs: uses: actions/checkout@v4 with: lfs: true - ref: ${{ github.event.pull_request.merge_commit_sha }} + ref: ${{ github.event_name == 'pull_request' && github.sha || format('refs/pull/${0}/merge', github.event.pull_request.number) }} - name: Initialize the workflow id: init @@ -93,7 +93,7 @@ jobs: with: shell: ${{ needs.Initialization.outputs.githubRunnerShell }} runsOn: ${{ needs.Initialization.outputs.githubRunner }} - checkoutRef: ${{ github.event.pull_request.merge_commit_sha }} + checkoutRef: ${{ github.event_name == 'pull_request' && github.sha || format('refs/pull/${0}/merge', github.event.pull_request.number) }} parentTelemetryScopeJson: ${{ needs.Initialization.outputs.telemetryScopeJson }} project: ${{ matrix.project }} projectName: ${{ matrix.projectName }}