From b88347fd709866d51eb808cea2f777de0525f80e Mon Sep 17 00:00:00 2001 From: Jake Lee Kennedy <1731150+Jakeii@users.noreply.github.com> Date: Tue, 28 Jul 2026 12:24:45 +0100 Subject: [PATCH] update chromatic ref for merge_queue --- .github/workflows/dcr-chromatic.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dcr-chromatic.yml b/.github/workflows/dcr-chromatic.yml index 5516bcf2c4d..94ddb34d442 100644 --- a/.github/workflows/dcr-chromatic.yml +++ b/.github/workflows/dcr-chromatic.yml @@ -28,7 +28,9 @@ jobs: # By default the pull_request event will run on a ephermeral merge commit which simulates a merge between the pull request # and the target branch. This can cause issues with Chromatic https://www.chromatic.com/docs/turbosnap#github-pullrequest-triggers # Hopefully by checking out the HEAD commit of a PR instead of the merge commit we can avoid some of those issues. - ref: ${{ github.event.pull_request.head.sha }} + # We fallback to github.sha in case the workflow is triggered by a merge_group event, which doesn't have a pull_request object, see https://www.chromatic.com/docs/faq/merge-queue-ref/ + ref: ${{ github.event.pull_request.head.ref || github.sha }} + - name: Checkout - On Push Event uses: actions/checkout@v6 if: ${{ github.event_name == 'push' || github.event_name == 'merge_group' }}