Skip to content

Commit 5cf4768

Browse files
authored
ci: remove trusted author check for visual diff approval (ant-design#58116)
1 parent e060ac1 commit 5cf4768

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

.github/workflows/visual-regression-diff-approver.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,9 @@ jobs:
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
}
@@ -80,6 +77,7 @@ jobs:
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';

0 commit comments

Comments
 (0)