fix(ci): check out API-created dep branch via remote-tracking ref
CI / validate (pull_request) Successful in 1m2s
CI / auto-merge (pull_request) Successful in 22s

git fetch origin <branch> only sets FETCH_HEAD, so the silent checkout
failure left commits on the wrong ref and the push failed. Fetch into
refs/remotes/origin/<branch> and checkout -B from it.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Emil Simeonov
2026-09-19 21:15:45 +02:00
co-authored by Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
parent 36422592fd
commit 66ce8895eb
3 changed files with 72 additions and 3 deletions
+33
View File
@@ -0,0 +1,33 @@
# DEVX-170: create_dependency_pr checks out the API-created branch
## Problem
After DEVX-169 the dependency branch is created via `POST /branches`, but
`git fetch origin <branch>` only populates `FETCH_HEAD`. The follow-up
`git checkout <branch>` fails silently (`check=False`), commits land on
the wrong ref, and `git push origin <branch>` fails with
`src refspec does not match any`. Observed creating the sso_bridge 0.4.1
infra dependency PR.
## Approach
REQ-1: Fetch the API-created branch into `refs/remotes/origin/<branch>`
and force-create the local branch with `git checkout -B <branch>
origin/<branch>`, both with `check=True` so failures surface.
## Test Plan
- Unit test asserts the fetch refspec and `checkout -B` invocations.
## Deploy Plan
devx release tag; producers pick it up via pin bumps.
## Rollback Plan
Revert; dep-PR creation stays broken (status quo).
## Acceptance Criteria
- [x] REQ-1: the clone checks out the API-created branch so commit and
push target `deps/<pkg>-<version>`; covered by unit tests.