Skip to content
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 6 additions & 14 deletions .github/workflows/beps.reusable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,9 @@ jobs:
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0

- name: Fetch base branch history
run: |
git fetch --depth=500 origin canary
- name: Fetch canary ref
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Shallow clone breaks git history lookup in check script

The removal of fetch-depth: 0 from the check-beps job causes a shallow clone (depth 1 by default). The update_bep_readme.py --check script runs git log {canary_ref}..HEAD to determine file modification dates, which requires commit history between canary and HEAD. With a shallow clone, this history is unavailable, causing the script to incorrectly return "TBD" for last_modified dates instead of actual values, leading to potential check failures or inconsistent behavior between CI and local development.

Fix in Cursor Fix in Web

run: git fetch origin canary

- name: Install uv
uses: astral-sh/setup-uv@v5
Expand All @@ -56,9 +54,8 @@ jobs:
persist-credentials: false
fetch-depth: 0

- name: Fetch base branch history
run: |
git fetch --depth=500 origin canary
- name: Fetch canary ref
run: git fetch origin canary

- name: Start deployment
uses: bobheadxi/deployments@v1
Expand Down Expand Up @@ -122,10 +119,6 @@ jobs:
persist-credentials: false
fetch-depth: 0

- name: Fetch base branch history
run: |
git fetch --depth=500 origin canary

- name: Get branch name
id: branch
run: |
Expand All @@ -148,9 +141,8 @@ jobs:
🏗️ **Building BEPs preview...** (run [${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}))
comment-tag: beps-preview

- name: Fetch canary branch for diff
run: |
git fetch origin canary:canary || true
- name: Fetch canary ref
run: git fetch origin canary

- name: Setup Python
uses: actions/setup-python@v5
Expand Down
Loading
Loading