Repository navigation
fix(ci): keep other repositories' checkouts when applying local changes (DEP-8894) - #709
Conversation
…es (DEP-8894) `depot ci run` with local changes pinned the first actions/checkout step to the merge base, even when that step checks out another repository. Pick the first checkout of the workflow repository instead, for both the patch step and the --ssh-after-step offset, and skip the patch with a message when there is none. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 49eb46b818
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@codex review |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a5328c8daa
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ckout Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |


Summary
depot ci runstops pointing someone else's repository at our commit. 🎯What was happening
With local changes, the CLI pinned the first
actions/checkoutto our merge base, even when that step checks out another repository, so checkout failed withnot our ref.What happens now
The patch goes after the first checkout of the workflow's own repository, and
--ssh-after-stepfollows that same checkout. A literalrepositorynaming another repo (case-insensitive; Entire compared as owner/name) is left alone. If no checkout of the workflow repo exists, the job runs unpatched and warns. Depot Code keeps patching the first checkout, since it only checks out its own repo.Anything else
Not addressed: a workflow-repo checkout with
with.pathstill gets the patch applied in the workspace root.Also not addressed: a GitHub repo renamed since it was cloned has a stale name locally, so its own literal checkout runs unpatched with a warning.
🤖 Generated with Claude Code
Catch up on this pull request in Depot
Note
Medium Risk
Changes workflow mutation for every patched
depot ci run, but behavior is narrowly scoped to checkout matching with broad test coverage; wrong matching could still skip patches or pin the wrong step.Overview
Fixes
depot ci runlocal-change injection so it no longer rewrites the firstactions/checkoutwhen that step checks out a different repository (which could pin an invalid ref and fail the job).Patch application and merge-base pinning now target the first checkout that matches the workflow repository via new
workflowCheckoutIndexandrunRepository.checkoutName()(Entireowner/name, Depot Code empty so the first checkout still qualifies).${{ github.repository }}, case-insensitive literals, and default checkouts match; explicit checkouts of other repos or non-workflow expressions are left alone.injectTmateStepuses the same index when adjusting step offsets after a patch is injected. Jobs with no matching workflow checkout run without a patch and emit a stderr warning.Reviewed by Cursor Bugbot for commit 4af5600. Bugbot is set up for automated code reviews on this repo. Configure here.