-
Notifications
You must be signed in to change notification settings - Fork 430
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
fix: Fix dispatch event checkout #3407
base: dev
Are you sure you want to change the base?
Conversation
Integration tests success for 814e4e22ae230c8ccd708b2bf4ef9c331c30818b |
This reverts commit dc0d872.
Integration tests cancelled for e5c5dfb40a46140cee089f89f03d71c3cfddb723 |
Integration tests failure for 3b5ce99f48c9045899547b899e7c00b448e1ccec |
if: (github.event_name == 'repository_dispatch') | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }} |
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.
do we need to specify the repository name? Isn't it the default in this action?
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.
Should be fine (?) Default: ${{ github.repository }}
not sure what is the difference between the two. Maybe there's some kind of additional data that can be passed to the repository field that would make it able to checkout on the fork (?)
Test Plan
Dispatch events utilize pipelines from the default branch, and custom dispatch events cannot be run before merge—see https://github.com/orgs/community/discussions/24657?sort=top. This is why this change was not tested in this repository, as the changes already need to be present on the default branch.
Instead, I tested it on my personal repository with a simplified setup, but preserving the logic. I confirmed that for dispatch events, the checkout was done to the default origin branch, and after these changes, the checkout is done on the correct sha in the forked branch.
References
#3400 (comment)
TODO
Check the dispatch after it's merged to the default branch.