File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 3838 fs.writeFileSync("diff.zip", Buffer.from(download.data));
3939
4040 - run : unzip diff.zip
41- # 30000 bytes is about 300 lines, posting comment fails if too long
4241 - run : |
43- cat diff_*.txt | head -c 30000 | tee fulldiff.txt
42+ cat diff_*.txt | tee fulldiff.txt
4443
4544 - name : Post comment
4645 id : post-comment
4948 github-token : ${{ secrets.GITHUB_TOKEN }}
5049 script : |
5150 const fs = require('fs')
52- const data = fs.readFileSync('fulldiff.txt', { encoding: 'utf8' })
51+ let data = fs.readFileSync('fulldiff.txt', { encoding: 'utf8' })
52+ // posting comment fails if too long, so truncate
53+ if (data.length > 30000) {
54+ data = data.substring(0, 30000) + `\n\n... (truncated ${diff.length - 30000} chars) ...\n`
55+ }
5356
5457 console.log("Diff from mypy_primer:")
5558 console.log(data)
You can’t perform that action at this time.
0 commit comments