mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-24 03:04:21 +01:00
ci: format
This commit is contained in:
13
script/format.ts
Executable file
13
script/format.ts
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bun
|
||||
|
||||
import { $ } from "bun"
|
||||
|
||||
await $`bun run prettier --ignore-unknown --write $(git ls-files)`
|
||||
|
||||
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`
|
||||
}
|
||||
Reference in New Issue
Block a user