diff --git a/.github/workflows/dev-build-pr.yml b/.github/workflows/dev-build-pr.yml index 0636326b..8a9f53c0 100644 --- a/.github/workflows/dev-build-pr.yml +++ b/.github/workflows/dev-build-pr.yml @@ -35,7 +35,8 @@ jobs: if : ${{ github.event_name == 'pull_request_target' }} shell: pwsh run: | - $previous_commit = git rev-parse 'HEAD^' + $commits = git log -n 2 --pretty=format:%H + $previous_commit = $commits[1] if ($previous_commit -ne "${{ github.event.pull_request.head.sha }}") { throw "The pull request head commit has changed since the event was triggered." }