We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 97c58c6 commit 0204739Copy full SHA for 0204739
.github/workflows/run-clang-format.yml
@@ -36,9 +36,15 @@ jobs:
36
}
37
38
39
- const fs = require("fs").promises
40
- var output = await fs.readFile("clang-format.diff")
41
- const commentBody = '`clang-format` output for this changeset:\n```diff\n' + output + '\n```'
+ const fs = require("fs")
+ var output = fs.readFileSync("clang-format.diff", "utf8")
+ // make sure not to exceed maximum length of the comment
42
+ output = (output.length > 65000) ?
43
+ output.substring(0, 65000) + '\n(...)' : output
44
+ const commentBody =
45
+ '`clang-format` output for this changeset:\n```diff\n' +
46
+ output + '\n```'
47
+
48
if (commentId === -1) {
49
await github.rest.issues.createComment({
50
owner: context.repo.owner,
0 commit comments