ci/github-script/commits.js: unbreak

This succeeded before the ESM conversion because we weren't in strict mode
(and therefore `line` was added to the global scope).

ES Modules run in strict mode by default, so this is a `ReferenceError` now.

TypeScript would have caught this! I will keep working on converting to it.
This commit is contained in:
Michael Daniels
2026-09-01 19:27:05 -04:00
parent 6b9ce505e5
commit 375b60d66b

View File

@@ -290,7 +290,7 @@ export default async ({ github, context, core, dry, cherryPicks }) => {
// that's too long. We think this is unlikely to happen, and so don't deal with it explicitly.
const truncated = []
let total_length = 0
for (line of diff) {
for (const line of diff) {
total_length += line.length
if (total_length > 10000) {
truncated.push('', '[...truncated...]')