mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
ci: format
This commit is contained in:
parent
b05cbc9101
commit
e53fb7f8ed
3 changed files with 42 additions and 1 deletions
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`
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue