From e53fb7f8eda760b9d39479a2038720d54a434629 Mon Sep 17 00:00:00 2001 From: Dax Raad Date: Tue, 9 Sep 2025 23:47:47 -0400 Subject: ci: format --- script/format.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 script/format.ts (limited to 'script') diff --git a/script/format.ts b/script/format.ts new file mode 100755 index 000000000..d80820409 --- /dev/null +++ b/script/format.ts @@ -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` +} -- cgit v1.2.3