Skip to content

Commit 0ddb7b2

Browse files
authored
chore(ci): size-limit ignore comment error (#10995)
refactor: don't fail action when comment error
1 parent b324d86 commit 0ddb7b2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/actions/binary-limit/binary-limit-script.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ module.exports = async function action({ github, context, limit }) {
4444

4545
const comment = compareBinarySize(headSize, baseSize, context, baseCommit);
4646

47-
await commentToPullRequest(github, context, comment);
47+
try {
48+
await commentToPullRequest(github, context, comment);
49+
} catch (e) {
50+
console.error("Failed to comment on pull request:", e);
51+
}
4852

4953
const increasedSize = headSize - baseSize;
5054
if (increasedSize > limit) {

0 commit comments

Comments
 (0)