Skip to content

Commit 895231d

Browse files
authored
Merge pull request #41 from ewels/rfc-approval-comment-tweak
RFC approval status comment - nicer formatting with a table
2 parents 6a940ee + 3681bc9 commit 895231d

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

.github/workflows/rfc_approval.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,23 @@ jobs:
5757
}
5858
5959
function generateStatusBody(status, approvalsSet, rejectionsSet, awaitingArr) {
60-
return `## RFC approval status: ${status}\n\nRFC has approvals from ${approvalsSet.size}/${quorum} required @core-team quorum.\n\nCore team approvers: ${formatUserList([...approvalsSet])}\nRejection from: ${formatUserList([...rejectionsSet])}\nAwaiting approval from: ${formatUserList(awaitingArr)}`;
60+
const approvers = [...approvalsSet];
61+
const rejecters = [...rejectionsSet];
62+
const awaiting = awaitingArr;
63+
let body = `## RFC approval status: ${status}\n\nRFC has approvals from ${approvalsSet.size}/${quorum} required @core-team quorum.\n\n`;
64+
if (approvers.length > 0 || rejecters.length > 0 || awaiting.length > 0) {
65+
body += `|Review Status|Core Team members|\n|--|--|\n`;
66+
if (approvers.length > 0) {
67+
body += `| ✅ Approved | ${formatUserList(approvers)} |\n`;
68+
}
69+
if (rejecters.length > 0) {
70+
body += `| ❌ Rejected | ${formatUserList(rejecters)} |\n`;
71+
}
72+
if (awaiting.length > 0) {
73+
body += `| 🕐 Pending | ${formatUserList(awaiting)} |\n`;
74+
}
75+
}
76+
return body;
6177
}
6278
6379
// -------------------------------------------------

0 commit comments

Comments
 (0)