The open source coding agent.
TypeScript
ci: fix format
Aiden Clineeb4afdca658a
diff --git a/.github/workflows/format.yml b/.github/workflows/format.ymlindex f27678b2e7b..58fa8fca522 100644--- a/.github/workflows/format.yml+++ b/.github/workflows/format.yml@@ -18,7 +18,6 @@ jobs:uses: actions/checkout@v4with:token: ${{ secrets.GITHUB_TOKEN }}- ref: ${{ github.head_ref || github.ref }}- name: Setup Bunuses: ./.github/actions/setup-bun@@ -28,3 +27,5 @@ jobs:./script/format.tsenv:CI: true+ GITHUB_HEAD_REF: ${{ github.head_ref }}+ GITHUB_REF_NAME: ${{ github.ref_name }}diff --git a/script/format.ts b/script/format.tsindex f5a54a57fcb..aa0e82534ec 100755--- a/script/format.ts+++ b/script/format.ts@@ -5,9 +5,10 @@ import { $ } from "bun"await $`bun run prettier --ignore-unknown --write .`if (process.env["CI"] && (await $`git status --porcelain`.text())) {+ const branch = process.env["GITHUB_HEAD_REF"] || process.env["GITHUB_REF_NAME"]await $`git config --local user.email "[email protected]"`await $`git config --local user.name "GitHub Action"`await $`git add -A`await $`git commit -m "chore: format code"`- await $`git push --no-verify`+ await $`git push origin HEAD:${branch} --no-verify`}