Skip to content

Commit

Permalink
fix: pr-e2e uses pull_request.head.sha instead of pull_request.merge_…
Browse files Browse the repository at this point in the history
…commit_sha

Reason: pull_request.merge_commit_sha would consistently checkout the second last commit of the pr instead of the current one. This is unintended behaviour. With this change, the setting "Require branches to be up to date before merging" is required to run the test on the git state after the pr would be merged into main by requiring main to be merged into the pr branch before merging back to main.
Source: actions/checkout#518
  • Loading branch information
enrico-kaack-comp committed Oct 10, 2024
1 parent 9527263 commit f97a95e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/pr-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run-e2e-test:
uses: ./.github/workflows/e2e_test.yaml
with:
checkout-ref: ${{ github.event.pull_request.merge_commit_sha }}
checkout-ref: ${{ github.event.pull_request.head.sha }}
environment: ${{ github.event_name == 'pull_request_target' && contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.pull_request.author_association) && 'pr-e2e-no-approval' || 'pr-e2e-approval' }}
secrets:
CLI_SERVER_URL: ${{ secrets.CLI_SERVER_URL }}
Expand Down

0 comments on commit f97a95e

Please sign in to comment.