Files
opencode/script/format.ts
2025-11-06 13:03:12 -05:00

14 lines
387 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"`
await $`git push --no-verify`
}