-
Notifications
You must be signed in to change notification settings - Fork 70
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
Increase number of commits checked for squash merge #866
Increase number of commits checked for squash merge #866
Conversation
590191d
to
c3c253b
Compare
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.
This is great, a couple tweaks needed I think.
@tevanoff I tested out the canary and it worked well. In fact better than I expected: This PR's squash merge (no build, this commit) was detected on a build for a later commit on the base branch But even better, it didn't use a build on the head branch I created after the merge. I guess |
a7e171c
to
847d236
Compare
Instead of first checking if the current commit is a PR merge commit, instead, calculate all possible ancestor commits, THEN append the PR head to that list if relevant. This is a first step towards checking more than one commit being a PR merge commit
847d236
to
b9cf522
Compare
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! One final comment
🚀 PR was released in |
When a Chromatic build is run on a squashed merge commit, there's no way to determine the source branch to look for ancestor builds since the git history is lost during the squash. To get around this, we try to query the git provider for a PR that resulted in the squashed commit, which will give us the information we need.
We're currently only doing this lookup on the commit that a build is running on. This change increases the number of parent commits that we try to do the lookup on.
📦 Published PR as canary version:
10.0.1--canary.866.7107771516.0
✨ Test out this PR locally via: