From 5b2d48f6baaae85a2df0975d54630326d6f59476 Mon Sep 17 00:00:00 2001 From: Salman Date: Fri, 1 Nov 2024 05:38:07 +0530 Subject: [PATCH] fix: add checkout ref to pr's ref --- .github/workflows/format.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 06a6be8..02fbe3c 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -15,10 +15,11 @@ jobs: uses: actions/checkout@v3 with: # Make sure the actual branch is checked out when running on pull requests - ref: ${{ github.head_ref }} + ref: ${{ github.event.pull_request.head.ref || github.ref_name }} # This is important to fetch the changes to the previous commit fetch-depth: 0 + - name: Prettier Action uses: creyD/prettier_action@v4.3 with: