This is an automated email from the ASF dual-hosted git repository.

lhotari pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git


The following commit(s) were added to refs/heads/main by this push:
     new d5b53db93dc Fix broken ci-precommit (#1190)
d5b53db93dc is described below

commit d5b53db93dc91fe812a5499d4b7bf9d9a7f12913
Author: Yunze Xu <[email protected]>
AuthorDate: Thu Jul 2 18:05:56 2026 +0800

    Fix broken ci-precommit (#1190)
---
 .github/workflows/ci-precommit.yml | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/ci-precommit.yml 
b/.github/workflows/ci-precommit.yml
index dd1983aa85a..a603491f104 100644
--- a/.github/workflows/ci-precommit.yml
+++ b/.github/workflows/ci-precommit.yml
@@ -42,6 +42,11 @@ jobs:
     runs-on: ubuntu-latest
     timeout-minutes: 600
     steps:
+      - name: Compute PR fetch depth
+        id: pr-fetch-depth
+        env:
+          PR_COMMITS: ${{ github.event.pull_request.commits }}
+        run: echo "depth=$((PR_COMMITS + 2))" >> "$GITHUB_OUTPUT"
       - uses: actions/checkout@v6
         with:
           # Fetch the whole PR commit range (plus the merge commit) so that
@@ -49,7 +54,7 @@ jobs:
           # honored. Change detection diffs HEAD^1..HEAD (the merge ref's base
           # parent), which only needs depth 2, but the directive scan walks the
           # full range.
-          fetch-depth: ${{ github.event.pull_request.commits + 2 }}
+          fetch-depth: ${{ steps.pr-fetch-depth.outputs.depth }}
       - uses: actions/checkout@v6
         with:
           ref: 'asf-site-next'

Reply via email to