format.ts 387 B

12345678910111213
  1. #!/usr/bin/env bun
  2. import { $ } from "bun"
  3. await $`bun run prettier --ignore-unknown --write .`
  4. if (process.env["CI"] && (await $`git status --porcelain`.text())) {
  5. await $`git config --local user.email "[email protected]"`
  6. await $`git config --local user.name "GitHub Action"`
  7. await $`git add -A`
  8. await $`git commit -m "chore: format code"`
  9. await $`git push --no-verify`
  10. }