From 481d02a4bc6b4e70a40ef1ccdd24c5e3ffa6c0e2 Mon Sep 17 00:00:00 2001 From: jprochazk Date: Thu, 7 Nov 2024 14:54:48 +0100 Subject: [PATCH] try using commit hashes from event payload --- .github/workflows/auto_docs_check.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/auto_docs_check.yml b/.github/workflows/auto_docs_check.yml index d97858e2d37f..02bbc630cf29 100644 --- a/.github/workflows/auto_docs_check.yml +++ b/.github/workflows/auto_docs_check.yml @@ -40,14 +40,11 @@ jobs: git config --global user.name "rerun-bot" git config --global user.email "bot@rerun.io" - # Create a temporary branch from docs-latest - git checkout main git checkout docs-latest - git checkout -b temp-cherry-pick # Try the cherry-pick and capture the exit code - from=$(git rev-parse main) - to=$(git rev-parse ${{ github.event.pull_request.head.ref }}) + from=$(git rev-parse ${{ github.event.pull_request.base.sha }}) + to=$(git rev-parse ${{ github.event.pull_request.head.sha }}) if git cherry-pick --no-commit $from..$to; then echo "Cherry-pick successful" exit 0