Skip to content

Commit

Permalink
Actually print the full diff into the log when the log is too big (#974)
Browse files Browse the repository at this point in the history
  • Loading branch information
weswigham committed Mar 5, 2024
1 parent d887c24 commit fc31ea5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .changeset/plenty-news-shake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
7 changes: 6 additions & 1 deletion packages/dtslint-runner/src/post-results.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@ async function main() {
if (diffComment) {
newComment += `There were interesting changes:\n`;
if (newComment.length + diffComment.length + checkLogsMessage.length > 65535) {
newComment += `Changes are too big to display here, please check the log.`;
// hardlink directly into the output of this script
const detailedLogUrl = `https://typescript.visualstudio.com/TypeScript/_build/results?buildId=${buildId}&view=logs&j=275f1d19-1bd8-5591-b06b-07d489ea915a&t=40b1ee41-44d6-5bba-aa04-4b76a5c732e5`;
newComment += `Changes are too big to display here, please check [the log](${detailedLogUrl}).`;
console.log("There were interesting changes:\n");
console.log(diffComment);
console.log("\n");
} else {
newComment += diffComment;
}
Expand Down

0 comments on commit fc31ea5

Please sign in to comment.