Skip to content

Commit 94566df

Browse files
committed
Disable Biome assist and apply formatting fixes
- Disable Biome AI assist feature - Apply automated formatting fixes to claude.mjs script
1 parent 3b517b7 commit 94566df

File tree

2 files changed

+43
-16
lines changed

2 files changed

+43
-16
lines changed

biome.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@
5353
"allowTrailingCommas": true
5454
}
5555
},
56+
"assist": {
57+
"enabled": false
58+
},
5659
"linter": {
5760
"rules": {
5861
"complexity": {

scripts/claude.mjs

Lines changed: 40 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3321,7 +3321,9 @@ Let's work through this together to get CI passing.`
33213321
}
33223322
}
33233323
if (filteredLogs.split('\n').length > 10) {
3324-
log.substep(` ... (${filteredLogs.split('\n').length - 10} more lines)`)
3324+
log.substep(
3325+
` ... (${filteredLogs.split('\n').length - 10} more lines)`,
3326+
)
33253327
}
33263328

33273329
// Check if we've seen this CI error before
@@ -3350,9 +3352,10 @@ Let's work through this together to get CI passing.`
33503352
log.progress('Analyzing CI failure with Claude')
33513353

33523354
// Keep logs under 2000 chars to avoid context issues
3353-
const truncatedLogs = filteredLogs.length > 2000
3354-
? `${filteredLogs.substring(0, 2000)}\n... (truncated)`
3355-
: filteredLogs
3355+
const truncatedLogs =
3356+
filteredLogs.length > 2000
3357+
? `${filteredLogs.substring(0, 2000)}\n... (truncated)`
3358+
: filteredLogs
33563359

33573360
const fixPrompt = `Fix CI failures for commit ${currentSha.substring(0, 7)} in ${owner}/${repo}.
33583361
@@ -3498,7 +3501,10 @@ Requirements:
34983501
34993502
Commit the changes now.`
35003503

3501-
const commitTmpFile = path.join(rootPath, `.claude-commit-${Date.now()}.txt`)
3504+
const commitTmpFile = path.join(
3505+
rootPath,
3506+
`.claude-commit-${Date.now()}.txt`,
3507+
)
35023508
await fs.writeFile(commitTmpFile, commitPrompt, 'utf8')
35033509

35043510
const commitArgs = prepareClaudeArgs([], opts)
@@ -3603,7 +3609,8 @@ Commit the changes now.`
36033609

36043610
// Check for any failed or cancelled jobs
36053611
const failedJobs = jobs.filter(
3606-
job => job.conclusion === 'failure' || job.conclusion === 'cancelled'
3612+
job =>
3613+
job.conclusion === 'failure' || job.conclusion === 'cancelled',
36073614
)
36083615

36093616
// Find new failures we haven't fixed yet
@@ -3648,16 +3655,19 @@ Commit the changes now.`
36483655
}
36493656
}
36503657
if (filteredLogs.split('\n').length > 10) {
3651-
log.substep(` ... (${filteredLogs.split('\n').length - 10} more lines)`)
3658+
log.substep(
3659+
` ... (${filteredLogs.split('\n').length - 10} more lines)`,
3660+
)
36523661
}
36533662

36543663
// Analyze and fix with Claude
36553664
log.progress(`Analyzing failure in ${job.name}`)
36563665

36573666
// Keep logs under 2000 chars to avoid context issues
3658-
const truncatedLogs = filteredLogs.length > 2000
3659-
? `${filteredLogs.substring(0, 2000)}\n... (truncated)`
3660-
: filteredLogs
3667+
const truncatedLogs =
3668+
filteredLogs.length > 2000
3669+
? `${filteredLogs.substring(0, 2000)}\n... (truncated)`
3670+
: filteredLogs
36613671

36623672
const fixPrompt = `Fix CI failure in "${job.name}" (run ${lastRunId}, commit ${currentSha.substring(0, 7)}).
36633673
@@ -3688,7 +3698,10 @@ Fix the issue by making necessary file changes. Be direct, don't ask questions.`
36883698

36893699
try {
36903700
// Write prompt to temp file
3691-
const tmpFile = path.join(rootPath, `.claude-fix-${Date.now()}.txt`)
3701+
const tmpFile = path.join(
3702+
rootPath,
3703+
`.claude-fix-${Date.now()}.txt`,
3704+
)
36923705
await fs.writeFile(tmpFile, fixPrompt, 'utf8')
36933706

36943707
const fixArgs = prepareClaudeArgs([], opts)
@@ -3707,7 +3720,9 @@ Fix the issue by making necessary file changes. Be direct, don't ask questions.`
37073720
let scriptCmd
37083721
if (WIN32) {
37093722
// Try winpty (comes with Git for Windows)
3710-
const winptyCheck = await runCommandWithOutput('where', ['winpty'])
3723+
const winptyCheck = await runCommandWithOutput('where', [
3724+
'winpty',
3725+
])
37113726
if (winptyCheck.exitCode === 0) {
37123727
scriptCmd = `winpty ${claudeCommand} < "${tmpFile}"`
37133728
} else {
@@ -3804,7 +3819,10 @@ Requirements:
38043819
38053820
Commit the changes now.`
38063821

3807-
const commitTmpFile = path.join(rootPath, `.claude-commit-${Date.now()}.txt`)
3822+
const commitTmpFile = path.join(
3823+
rootPath,
3824+
`.claude-commit-${Date.now()}.txt`,
3825+
)
38083826
await fs.writeFile(commitTmpFile, commitPrompt, 'utf8')
38093827

38103828
const commitArgs = prepareClaudeArgs([], opts)
@@ -3815,7 +3833,9 @@ Commit the changes now.`
38153833

38163834
let commitScriptCmd
38173835
if (WIN32) {
3818-
const winptyCheck = await runCommandWithOutput('where', ['winpty'])
3836+
const winptyCheck = await runCommandWithOutput('where', [
3837+
'winpty',
3838+
])
38193839
if (winptyCheck.exitCode === 0) {
38203840
commitScriptCmd = `winpty ${commitCommand} < "${commitTmpFile}"`
38213841
} else {
@@ -3857,7 +3877,9 @@ Commit the changes now.`
38573877
log.done(`Committed fix for ${job.name}`)
38583878
hasPendingCommits = true
38593879
} else {
3860-
log.warn(`Claude commit failed with exit code ${commitExitCode}`)
3880+
log.warn(
3881+
`Claude commit failed with exit code ${commitExitCode}`,
3882+
)
38613883
}
38623884
} else {
38633885
log.substep(`No changes to commit for ${job.name}`)
@@ -3870,7 +3892,9 @@ Commit the changes now.`
38703892

38713893
// Show current status
38723894
if (fixedJobs.size > 0) {
3873-
log.substep(`Fixed ${fixedJobs.size} job(s) so far (commits pending push)`)
3895+
log.substep(
3896+
`Fixed ${fixedJobs.size} job(s) so far (commits pending push)`,
3897+
)
38743898
}
38753899
} catch (e) {
38763900
log.warn(`Failed to parse job data: ${e.message}`)

0 commit comments

Comments
 (0)