-
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
[ci_runner] Use merge commit sha from webhook event #6684
Conversation
2753f07
to
f08b07f
Compare
f08b07f
to
a50cad3
Compare
// the background job has not completed, or if the webhook provider does not | ||
// provide a generated merge commit. In this case, it should be manually | ||
// generated by merging the pushed and target branches. | ||
MergeCommitSHA string |
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.
any idea how reliable this merge_commit_sha is? if we're unsure, can we put it behind a flag and test in dev for a while?
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.
err I guess if it's non-empty, then it should exist remotely, otherwise they wouldn't know the SHA?
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.
If it exists on the webhook data, we should be able to reliably fetch it. I'll merge this now, so we'll have until Thursday to see how this does in dev
// the background job has not completed, or if the webhook provider does not | ||
// provide a generated merge commit. In this case, it should be manually | ||
// generated by merging the pushed and target branches. | ||
MergeCommitSHA string |
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.
err I guess if it's non-empty, then it should exist remotely, otherwise they wouldn't know the SHA?
To support merge-with-base behavior on pull requests, we've been fetching the target branch with --depth=0 (to ensure the merge-base is fetched) and manually calling
git merge
on the ci_runner. This can be slow. GitHub automatically generates the mergeCommitSHA on pull requests, so use that from the webhook data instead if it has been setRelated issues: N/A