-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade actions/checkout to v3 #1715
Conversation
based on the docs for v3, seems like it'd get the HEAD commit for the branch that triggers the workflow. relevant documentation: i also see this subsection of docs saying that that you can explicitly specify the 'pull request HEAD commit instead of merge commit' - https://github.com/actions/checkout#checkout-pull-request-head-commit-instead-of-merge-commit also, are there any expected changes to behavior of the GH actions? |
Exactly why I didn't add the second snippet ("PR head"). Everything was working as expected until we started using the (relatively new) pull_request_target event. Didn't notice @nathan-contino-mongo's issue because our tests didn't actually modify the docusaurus source in any meaningful way. So, my hypothesis is that <v3 just doesn't handle pull_request_target correctly. By upgrading, I'm hoping it will go back to the way it says it works in the docs, which is that by default (i.e. without the ref option) the checked out branch is the PR ref. I don't expect any impact on the other workflows. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm.
we should prob test out the pull_request_target
action further as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Boo, turns out my hypothesis was incorrect! Going with solution here: actions/checkout#518 (comment) Since we want the same "default" behavior of checkout on the pull_request event, we're checking out the merge commit. |
Checking if v3 supports the pull_request_target event to actually check out the PR branch by default