diff --git a/src/index.js b/src/index.js index a4ccb1b..579710e 100644 --- a/src/index.js +++ b/src/index.js @@ -98,10 +98,16 @@ class App { body: commentBody }); } else { - await this.client.rest.issues.createComment({ - ...issue, - body: commentBody - }); + try { + await this.client.rest.issues.createComment({ + ...issue, + body: commentBody + }); + } catch (err) { + if (!/cannot be modified.*discussion/i.test(err.message)) { + throw err; + } + } } } });