File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 38
38
fs.writeFileSync("diff.zip", Buffer.from(download.data));
39
39
40
40
- run : unzip diff.zip
41
- # 30000 bytes is about 300 lines, posting comment fails if too long
42
41
- run : |
43
- cat diff_*.txt | head -c 30000 | tee fulldiff.txt
42
+ cat diff_*.txt | tee fulldiff.txt
44
43
45
44
- name : Post comment
46
45
id : post-comment
49
48
github-token : ${{ secrets.GITHUB_TOKEN }}
50
49
script : |
51
50
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
+ }
53
56
54
57
console.log("Diff from mypy_primer:")
55
58
console.log(data)
You can’t perform that action at this time.
0 commit comments