fix: use `[x]` but not `[-]` to check if checkbox exists and is checked.
diff --git a/index.js b/index.js
index 71e158e..ed40ec3 100644
--- a/index.js
+++ b/index.js
@@ -100,7 +100,7 @@
labelList.push('PR: author is committer');
}
const content = context.payload.pull_request.body;
- if (content && content.indexOf('[-] The API has been changed.') > -1) {
+ if (content && content.indexOf('[x] The API has been changed.') > -1) {
labelList.push('PR: awaiting doc');
commentText += '\n\n' + text.PR_AWAITING_DOC;
}
@@ -118,7 +118,7 @@
app.on(['pull_request.edited'], async context => {
const content = context.payload.pull_request.body;
- if (content && content.indexOf('[-] The API has been changed.') > -1) {
+ if (content && content.indexOf('[x] The API has been changed.') > -1) {
return context.github.issues.addLabels(context.issue({
labels: ['PR: awaiting doc']
}));