-
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
Detect merge queue branch and retrieve real branch name from pull request #884
Detect merge queue branch and retrieve real branch name from pull request #884
Conversation
@ethriel3695 looks like you managed to get a merge queue test scenario, could you show me how to do so and if you have time, test this canary too? Thanks! |
@JonathanKolnik https://github.com/chromaui/vite-project/pull/6/files I changed the GitHub action in my test repo to use the Chromatic script instead of the GitHub Action. From there, I changed some styles in one of the components and created a PR. Then, I merged both PRs into the merge queue. Logs in place told me the CI branch from the merge queue. I'll test on this Canary version too. |
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.
@JonathanKolnik
It looks like it worked.
https://www.staging-chromatic.com/build?appId=6567827ff5eb53d578159b6a&number=32
https://www.staging-chromatic.com/build?appId=6567827ff5eb53d578159b6a&number=33
No baselines were detected on either of these merges because the merge queue builds are aware of the previously accepted baseline.
The one thing I'm unclear on is it doesn't look like the branch name changed at all.
https://github.com/chromaui/vite-project/actions/runs/7494123452/job/20401335868
https://github.com/chromaui/vite-project/actions/runs/7494168482/job/20401474600
@JonathanKolnik |
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 seems right to me!
🚀 PR was released in |
If the branch matches the merge queue branch pattern, we extract the pull request number from the branch name and query the index for the PRs actual branch name. We then use that for the rest of the build process.
This depends on a change to the index that allows headRefName to be read via the app code https://github.com/chromaui/chromatic/pull/8128
📦 Published PR as canary version:
10.2.3--canary.884.7542729719.0
✨ Test out this PR locally via: