Skip to content

Commit

Permalink
ci: fix version check CI job (#3032)
Browse files Browse the repository at this point in the history
Part of the job checks out the pull request (this isn't done
automatically because this runs with `pull_request_target` which checks
out the base by default).

That step was using `merge_commit_sha` which is not correct (this still
checks out the base). The fix instead checks out `head.sha` which is
correct.

It is not possible to get a `merge_commit_sha` (there is a request for
this [here](actions/checkout#518)) but
`head.sha` should be good enough for our purposes.
  • Loading branch information
westonpace authored Oct 21, 2024
1 parent 5fd9fad commit f803ca3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/pr-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
with:
# pull_request_target checks out the base branch by default, not
# the PR branch.
ref: "${{ github.event.pull_request.merge_commit_sha }}"
ref: "${{ github.event.pull_request.head.sha }}"
path: pr
- uses: actions/setup-python@v5
with:
Expand Down

0 comments on commit f803ca3

Please sign in to comment.