diff --git a/src/index.js b/src/index.js index f1a8674..7fa48f6 100644 --- a/src/index.js +++ b/src/index.js @@ -46,10 +46,16 @@ class App { if (lockComment) { core.debug(`Commenting (${type}: ${issue.issue_number})`); - await this.client.rest.issues.createComment({ - ...issue, - body: lockComment - }); + try { + await this.client.rest.issues.createComment({ + ...issue, + body: lockComment + }); + } catch (err) { + if (!/cannot be modified.*discussion/i.test(err.message)) { + throw err; + } + } } if (lockLabels) {