Skip to content

Commit 26fdd45

Browse files
authored
Update mypy_primer_comment.yml
1 parent 04cac4b commit 26fdd45

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

.github/workflows/mypy_primer_comment.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ jobs:
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
42+
- run: |
43+
cat diff_*.txt | head -c 30000 | tee fulldiff.txt
4144
4245
# Based on https://github.com/kanga333/comment-hider
4346
- name: Hide old comments
@@ -77,13 +80,7 @@ jobs:
7780
github-token: ${{secrets.GITHUB_TOKEN}}
7881
script: |
7982
const fs = require('fs')
80-
// Keep in sync with shards produced by mypy_primer workflow
81-
const data = (
82-
['diff_0.txt', 'diff_1.txt', 'diff_2.txt']
83-
.map(fileName => fs.readFileSync(fileName, { encoding: 'utf8' }))
84-
.join('')
85-
.substr(0, 30000) // About 300 lines
86-
)
83+
const data = fs.readFileSync('fulldiff.txt', { encoding: 'utf8' })
8784
8885
console.log("Diff from mypy_primer:")
8986
console.log(data)

0 commit comments

Comments
 (0)