mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
14 lines
453 B
TypeScript
Executable file
14 lines
453 B
TypeScript
Executable file
#!/usr/bin/env bun
|
|
|
|
import { $ } from "bun"
|
|
|
|
await $`bun run prettier --ignore-unknown --write .`
|
|
|
|
if (process.env["CI"] && (await $`git status --porcelain`.text())) {
|
|
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"`
|
|
const branch = process.env["PUSH_BRANCH"]
|
|
await $`git push origin HEAD:${branch} --no-verify`
|
|
}
|