Skip to content

Commit a6af99b

Browse files
authored
Report each repo in a separate comment for easier triaging (#71)
1 parent c8b468d commit a6af99b

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

src/postGithubIssue.ts

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ for (const path of metadataFilePaths) {
4747
const title = entrypoint === "tsserver"
4848
? `[ServerErrors][${language}] ${newTscResolvedVersion}`
4949
: `[NewErrors] ${newTscResolvedVersion} vs ${oldTscResolvedVersion}`;
50+
5051
const description = entrypoint === "tsserver"
5152
? `The following errors were reported by ${newTscResolvedVersion}`
5253
: `The following errors were reported by ${newTscResolvedVersion}, but not by ${oldTscResolvedVersion}`;
@@ -63,25 +64,10 @@ This run considered ${repoCount} popular TS repos from GH (after skipping the to
6364
| Outcome | Count |
6465
|---------|-------|
6566
${Object.keys(statusCounts).sort().map(status => `| ${status} | ${statusCounts[status as RepoStatus]} |\n`).join("")}
66-
</details>
67-
68-
69-
`;
67+
</details>`;
7068

7169
const resultPaths = pu.glob(resultDirPath, `**/*.${resultFileNameSuffix}`).sort((a, b) => path.basename(a).localeCompare(path.basename(b)));
7270
const outputs = resultPaths.map(p => fs.readFileSync(p, { encoding: "utf-8" }).replace(new RegExp(artifactFolderUrlPlaceholder, "g"), artifactsUri));
7371

74-
75-
// GH caps the maximum body length, so paginate if necessary
76-
const bodyChunks: string[] = [];
77-
let chunk = header;
78-
for (const output of outputs) {
79-
if (chunk.length + output.length > 65535) {
80-
bodyChunks.push(chunk);
81-
chunk = "";
82-
}
83-
chunk += output;
84-
}
85-
bodyChunks.push(chunk);
86-
72+
const bodyChunks = [header, ...outputs];
8773
git.createIssue(postResult, title, bodyChunks, /*sawNewErrors*/ !!outputs.length);

0 commit comments

Comments
 (0)