mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-26 13:51:30 +08:00
fix mypy_primer_comment workflow for more shards (#6533)
This commit is contained in:
13
.github/workflows/mypy_primer_comment.yml
vendored
13
.github/workflows/mypy_primer_comment.yml
vendored
@@ -38,6 +38,9 @@ jobs:
|
||||
fs.writeFileSync("diff.zip", Buffer.from(download.data));
|
||||
|
||||
- run: unzip diff.zip
|
||||
# 30000 bytes is about 300 lines, posting comment fails if too long
|
||||
- run: |
|
||||
cat diff_*.txt | head -c 30000 | tee fulldiff.txt
|
||||
|
||||
- name: Post comment
|
||||
id: post-comment
|
||||
@@ -46,15 +49,7 @@ jobs:
|
||||
github-token: ${{secrets.GITHUB_TOKEN}}
|
||||
script: |
|
||||
const fs = require('fs')
|
||||
const data = (
|
||||
['diff_0.txt', 'diff_1.txt']
|
||||
.map(fileName => fs.readFileSync(fileName, { encoding: 'utf8' }))
|
||||
.join('')
|
||||
.substr(0, 30000) // About 300 lines
|
||||
)
|
||||
|
||||
console.log("Diff from mypy_primer:")
|
||||
console.log(data)
|
||||
const data = fs.readFileSync('fulldiff.txt', { encoding: 'utf8' })
|
||||
|
||||
let body
|
||||
if (data.trim()) {
|
||||
|
||||
Reference in New Issue
Block a user