From e4b086938e991bb4b23de13fca11cc8c6cc7e477 Mon Sep 17 00:00:00 2001 From: David Blass Date: Fri, 16 Jan 2026 15:52:37 +0000 Subject: [PATCH] iterate on CI --- .github/workflows/test.yml | 1 + utils/setup.ts | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6478b88..d6e8447 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,6 +13,7 @@ jobs: test: runs-on: ubuntu-latest env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} CURSOR_API_KEY: ${{ secrets.CURSOR_API_KEY }} diff --git a/utils/setup.ts b/utils/setup.ts index 6b1a81c..8f0d1f1 100644 --- a/utils/setup.ts +++ b/utils/setup.ts @@ -31,7 +31,15 @@ export function setupTestRepo(options: SetupOptions): void { const repo = process.env.GITHUB_REPOSITORY; if (!repo) throw new Error("GITHUB_REPOSITORY is required"); log.info(`ยป cloning ${repo} into ${tempDir}...`); - $("git", ["clone", `git@github.com:${repo}.git`, tempDir]); + + // use HTTPS with token in CI, SSH locally + if (process.env.CI) { + const token = process.env.GITHUB_TOKEN; + if (!token) throw new Error("GITHUB_TOKEN is required in CI"); + $("git", ["clone", `https://x-access-token:${token}@github.com/${repo}.git`, tempDir]); + } else { + $("git", ["clone", `git@github.com:${repo}.git`, tempDir]); + } } interface SetupGitParams {