Skip to content

Commit 4f94b98

Browse files
(maint) Always pass when a docs team member has approved (#31018)
1 parent 13394ba commit 4f94b98

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.github/workflows/codeowner_review_status.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ jobs:
6868
}
6969
});
7070
71-
// Get current approvals
72-
const approvals = new Set(
71+
// Get current approvals (will be filtered by team membership later)
72+
const allApprovals = new Set(
7373
Array.from(latestReviews.values())
7474
.filter(review => review.state === 'APPROVED')
7575
.map(review => review.user.login)
@@ -113,11 +113,13 @@ jobs:
113113
console.log(`Documentation team considered requested: ${isDocumentationTeamRequested}`);
114114
115115
if (isDocumentationTeamRequested) {
116-
// Check for approval from documentation team members
117-
hasDocumentationApproval = teamMembers.some(member =>
118-
approvals.has(member.login)
116+
// Check for approval from documentation team members only
117+
const docsTeamApprovals = teamMembers.filter(member =>
118+
allApprovals.has(member.login)
119119
);
120+
hasDocumentationApproval = docsTeamApprovals.length > 0;
120121
122+
console.log(`Documentation team members who approved: ${docsTeamApprovals.map(m => m.login).join(', ')}`);
121123
console.log(`Documentation team approval status: ${hasDocumentationApproval}`);
122124
} else {
123125
// If documentation team is not requested, no approval needed

0 commit comments

Comments
 (0)