Drop unneeded fetch-depth: 0 from two workflows#9489
Drop unneeded fetch-depth: 0 from two workflows#9489alokedesai merged 3 commits intowarpdotdev:masterfrom
Conversation
The cleanup job in feature_flag_cleanup.yml only edits source files at HEAD; the agent prompt does not reference git history. The delete-release job in delete_release.yml only pushes HEAD to a renamed ref and deletes the old branch server-side. Neither needs the full repo history that fetch-depth: 0 forces. Removing it falls back to the action's default shallow clone, cutting checkout time on the warp repo without changing behavior.
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I reviewed this pull request and requested human review from: @alokedesai. I left feedback as a comment so a maintainer can approve. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR removes fetch-depth: 0 from two GitHub Actions checkout steps where the changed jobs only need the checked-out commit rather than full repository history.
Concerns
- No blocking concerns found.
Verdict
Found: 0 critical, 0 important, 0 suggestions
Approve
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
| uses: namespacelabs/nscloud-checkout-action@938f5d2d403d6224d9a0c0dc559b1dae09c2ede4 # v8.1.1 | ||
| with: | ||
| ref: ${{ needs.analyze.outputs.analyzed_sha }} | ||
| fetch-depth: 0 |
There was a problem hiding this comment.
I believe this one is necessary in order for the agent to run git blame
alokedesai
left a comment
There was a problem hiding this comment.
Thanks for contributing! I'd prefer if we kept fetch-depth for feature_flag_cleanup.yml but I support removing it for delete_release.yml
Per @alokedesai, restore fetch-depth: 0 on the cleanup job since the agent may inspect history. Also drop it from the create_pr job, where peter-evans/create-pull-request only needs the checked-out commit to apply the patch and push a new branch.
|
Thanks @alokedesai — agreed. Restored While I was in there, I also dropped
No history walk anywhere — |
|
Thanks! Could we keep isolated to just |
Restore fetch-depth: 0 in feature_flag_cleanup.yml to keep this PR isolated to delete_release.yml as requested in review.
|
Done — reverted the feature_flag_cleanup.yml change in 3bd890d. PR is now scoped to delete_release.yml only. |
Summary
Two workflow checkouts request the full repo history via
fetch-depth: 0but never use it. Falling back to the default shallow clone speeds them up at no behavioral cost.Analysis
I scanned every
fetch-depth: 0site in.github/:check_approvals.yml:19git merge-base+git diffbetween base/headfilter: blob:none.create_release.yml:1623warpdotdev/generate-changelogfeature_flag_cleanup.yml:30(analyze)git blameofCargo.tomlfeature_flag_cleanup.yml:161(cleanup)feature_flag_cleanup.yml:218(create_pr)peter-evans/create-pull-requestpeter-evansonly requires deep history when it must include prior local commits. Worth a follow-up.delete_release.yml:95git push HEAD:refs/heads/<new>thengit push --delete <old>Changes
feature_flag_cleanup.yml— removedfetch-depth: 0from the cleanup job. The Oz agent edits source files at HEAD; no git history operations occur in the prompt.delete_release.yml— removedfetch-depth: 0from the delete job. Renaming a branch is two server-side pushes; only the tip commit is needed.Test plan
feature_flag_cleanup.ymlsucceeds end-to-end (analyze → cleanup → create_pr).delete_release.ymlinvocation succeeds (rename + delete).