mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-10-03 16:33:49 +08:00
Increase mypy_primer comment length (#9598)
This commit is contained in:
1 parent
25b3999a10
commit
2ffd867f25
1 file changed
+5
-3
@@ -50,9 +50,11 @@ jobs:
|
||||
script: |
|
||||
const fs = require('fs')
|
||||
let data = fs.readFileSync('fulldiff.txt', { encoding: 'utf8' })
|
||||
// posting comment fails if too long, so truncate
|
||||
if (data.length > 30000) {
|
||||
let truncated_data = data.substring(0, 30000)
|
||||
|
||||
// Maximum comment length is 65536 characters. We need much less than 236 for extra text.
|
||||
const MAX_LENGTH = 65300
|
||||
if (data.length > MAX_LENGTH) {
|
||||
let truncated_data = data.substring(0, MAX_LENGTH)
|
||||
let lines_truncated = data.split('\n').length - truncated_data.split('\n').length
|
||||
data = truncated_data + `\n\n... (truncated ${lines_truncated} lines) ...\n`
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user