disable checkout credential persistence - #3674
Merged
Merged
Conversation
ww-oai
marked this pull request as ready for review
August 19, 2026 15:32
Contributor
ww-oai
force-pushed
the
oss-remediation/01-artipacked
branch
from
August 19, 2026 15:36
048594b to
6cc98cd
Compare
ww-oai
commented
Aug 19, 2026
Comment on lines
+21
to
+26
| FETCH_DEPTH: 0 | ||
| steps: | ||
| - name: Calculate fetch-depth | ||
| if: github.event_name == 'pull_request' | ||
| env: | ||
| PR_COMMITS: ${{ github.event.pull_request.commits }} | ||
| run: | | ||
| echo "FETCH_DEPTH=$((PR_COMMITS + 1))" >> "$GITHUB_ENV" | ||
|
|
||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | ||
| with: | ||
| persist-credentials: false | ||
| # Ensure the comparison base is available to the scripts below. | ||
| fetch-depth: ${{ env.FETCH_DEPTH }} | ||
| fetch-depth: 0 |
Contributor
Author
There was a problem hiding this comment.
NB: This didn't interact well with stacked PRs:
It failed because the breaking-change workflow’s shallow clone is too shallow for stacked PR merge commits—not because it found an API break.
The workflow computes fetch-depth = PR_COMMITS + 1. PR #3676 has one commit, so it fetched depth 2. But GitHub represents the stack with nested synthetic merges:
top synthetic merge
├── base synthetic merge
│ └── actual BASE_SHA ← depth 3, not fetched
└── PR #3676 head
griffe.load_git() then tried to create a worktree at the missing BASE_SHA and raised:
RuntimeError: Could not create git worktree
The current replacement runs reproduce the same issue, so it isn’t transient. The robust workflow fix is to use fetch-depth: 0 for this job, or otherwise explicitly fetch BASE_SHA. No
SDK test or vulnerability audit failed.
Contributor
Author
There was a problem hiding this comment.
(I think I have a cleaner/faster solution though, incoming.)
Contributor
There was a problem hiding this comment.
Yea i ran into similar things w/ stacked prs getting a little wonky
Contributor
There was a problem hiding this comment.
I think part of the annoyance is our breaking change detector only runs based on diff from main and is using that as the branch head; and then you can't merge the whole stack in.
We should fix this though unintended and probably better to do something like using the last release
ww-oai
force-pushed
the
oss-remediation/01-artipacked
branch
from
August 19, 2026 15:41
4cd7b5f to
e88260c
Compare
apcha-oai
approved these changes
Aug 19, 2026
ww-oai
commented
Aug 19, 2026
Comment on lines
+24
to
+28
| persist-credentials: false | ||
| fetch-depth: 1 | ||
|
|
||
| - name: Fetch comparison base | ||
| run: git fetch --no-tags --depth=1 origin "$BASE_SHA" |
Contributor
Author
There was a problem hiding this comment.
@apcha-oai I think this does the trick 🙂
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes being requested
Additional context & links