File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6666
6767 // https://regex101.com/r/kLjudz/1
6868 const RE = /(?<=\>\s\[!IMPORTANT\].*?- \[ \])/s;
69- const trustedRoles = ['MEMBER', 'OWNER', 'COLLABORATOR'];
70- const isTrustedAuthor = trustedRoles.includes(comment.author_association);
7169 if (
7270 comment.body.includes('- [x] Visual diff is acceptable') &&
73- comment.body.match(RE) == null /** 检查 IMPORTANT 是否存在未勾选的 */ &&
74- isTrustedAuthor
71+ comment.body.match(RE) == null /** 检查 IMPORTANT 是否存在未勾选的 */
7572 ) {
7673 hasMemberApprove = true;
7774 }
8077 console.log('hasDiffSuccess:', hasDiffSuccess);
8178 console.log('hasDiffFailed:', hasDiffFailed);
8279 console.log('hasMemberApprove:', hasMemberApprove);
80+ console.log('commentBody:', comments.map(comment => comment.body));
8381
8482 const diffPassed = hasDiffSuccess || (hasDiffFailed && hasMemberApprove);
8583 const mergedStatus = diffPassed ? 'success' : hasDiffFailed ? 'failure' : 'pending';
You can’t perform that action at this time.
0 commit comments