diff options
| author | Aiden Cline <[email protected]> | 2025-12-07 12:17:40 -0600 |
|---|---|---|
| committer | Aiden Cline <[email protected]> | 2025-12-07 12:17:40 -0600 |
| commit | eb4afdca658a915d692cb4b1c0de420f7811626c (patch) | |
| tree | e2f16bc886d9c5539a1e3fa885b8df757a72dc7b /script/format.ts | |
| parent | 93917495776b37d021584f55956c3e746be4d222 (diff) | |
| download | opencode-eb4afdca658a915d692cb4b1c0de420f7811626c.tar.gz opencode-eb4afdca658a915d692cb4b1c0de420f7811626c.zip | |
ci: fix format
Diffstat (limited to 'script/format.ts')
| -rwxr-xr-x | script/format.ts | 3 |
1 files changed, 2 insertions, 1 deletions
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 "[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` } |
