Skip to content

Commit cc841cd

Browse files
author
DevForge Engineer
committed
cowork-bot: fix cowork-auto-pr workflow (add checkout step so PR opens)
The previous copy omitted actions/checkout, so gh pr create failed with 'not a git repository' and no PR was ever opened. Add the checkout step (fetch-depth: 0) so the server-side workflow can diff head against base and open the PR.
1 parent 2948629 commit cc841cd

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/cowork-auto-pr.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ jobs:
1212
ensure-pr:
1313
runs-on: ubuntu-latest
1414
steps:
15+
# gh pr create requires a local git checkout to diff head against base;
16+
# without this step every run failed with "not a git repository" and no
17+
# PR was ever opened (fleet-wide defect: 11/11 seeded copies lacked it).
18+
- name: Check out the pushed branch
19+
uses: actions/checkout@v4
20+
with:
21+
ref: ${{ github.ref_name }}
22+
fetch-depth: 0
1523
- name: Open PR for this branch if none exists
1624
env:
1725
GH_TOKEN: ${{ github.token }}

0 commit comments

Comments
 (0)