pull/11328/head
Dax Raad 2026-01-30 10:28:12 -05:00
parent 9cf3e651ca
commit e4d3b961cd
1 changed files with 9 additions and 4 deletions

View File

@ -106,12 +106,17 @@ async function main() {
} }
const commitMsg = `Apply PR #${pr.number}: ${pr.title}` const commitMsg = `Apply PR #${pr.number}: ${pr.title}`
const commit = await $`git commit -m ${commitMsg}`.nothrow() const commit = await Bun.spawn(["git", "commit", "-m", commitMsg], {
if (commit.exitCode !== 0) { stdout: "pipe",
console.log(` Failed to commit: ${commit.stderr}`) stderr: "pipe",
})
const commitExit = await commit.exited
const commitStderr = await Bun.readableStreamToText(commit.stderr)
if (commitExit !== 0) {
console.log(` Failed to commit: ${commitStderr}`)
await $`git checkout -- .`.nothrow() await $`git checkout -- .`.nothrow()
await $`git clean -fd`.nothrow() await $`git clean -fd`.nothrow()
skipped.push({ number: pr.number, reason: `Commit failed: ${commit.stderr}` }) skipped.push({ number: pr.number, reason: `Commit failed: ${commitStderr}` })
continue continue
} }