mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-28 22:56:55 +08:00
mypy_primer: report lines truncated (#7993)
Co-authored-by: hauntsaninja <>
This commit is contained in:
4
.github/workflows/mypy_primer_comment.yml
vendored
4
.github/workflows/mypy_primer_comment.yml
vendored
@@ -51,7 +51,9 @@ jobs:
|
||||
let data = fs.readFileSync('fulldiff.txt', { encoding: 'utf8' })
|
||||
// posting comment fails if too long, so truncate
|
||||
if (data.length > 30000) {
|
||||
data = data.substring(0, 30000) + `\n\n... (truncated ${data.length - 30000} chars) ...\n`
|
||||
let truncated_data = data.substring(0, 30000)
|
||||
let lines_truncated = data.split('\n').length - truncated_data.split('\n').length
|
||||
data = truncated_data + `\n\n... (truncated ${lines_truncated} lines) ...\n`
|
||||
}
|
||||
|
||||
let body
|
||||
|
||||
Reference in New Issue
Block a user