Skip to content
This repository was archived by the owner on Feb 19, 2026. It is now read-only.

Commit e4d3b96

Browse files
committed
ci
1 parent 9cf3e65 commit e4d3b96

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

script/beta.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,17 @@ async function main() {
106106
}
107107

108108
const commitMsg = `Apply PR #${pr.number}: ${pr.title}`
109-
const commit = await $`git commit -m ${commitMsg}`.nothrow()
110-
if (commit.exitCode !== 0) {
111-
console.log(` Failed to commit: ${commit.stderr}`)
109+
const commit = await Bun.spawn(["git", "commit", "-m", commitMsg], {
110+
stdout: "pipe",
111+
stderr: "pipe",
112+
})
113+
const commitExit = await commit.exited
114+
const commitStderr = await Bun.readableStreamToText(commit.stderr)
115+
if (commitExit !== 0) {
116+
console.log(` Failed to commit: ${commitStderr}`)
112117
await $`git checkout -- .`.nothrow()
113118
await $`git clean -fd`.nothrow()
114-
skipped.push({ number: pr.number, reason: `Commit failed: ${commit.stderr}` })
119+
skipped.push({ number: pr.number, reason: `Commit failed: ${commitStderr}` })
115120
continue
116121
}
117122

0 commit comments

Comments
 (0)