From eb4afdca658a915d692cb4b1c0de420f7811626c Mon Sep 17 00:00:00 2001 From: Aiden Cline Date: Sun, 7 Dec 2025 12:17:40 -0600 Subject: ci: fix format --- script/format.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'script') diff --git a/script/format.ts b/script/format.ts index f5a54a57f..aa0e82534 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 "action@github.com"` 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` } -- cgit v1.2.3