ci(scripts): consistent variables & comments (#420)
This commit is contained in:
1 parent
a974422f0a
commit
6cfb96b1e4
8 files changed
+49
-48
No files matched your search
@@ -13,7 +13,7 @@ const userstylesData = await getUserstylesData().catch((err) => {
|
||||
Deno.exit(1);
|
||||
});
|
||||
|
||||
// lowercase usernames of all the "current-maintainers" in the file
|
||||
// Lowercase usernames of all the "current-maintainers" in the file.
|
||||
const maintainers = [
|
||||
...new Set(
|
||||
Object.values(userstylesData.userstyles).flatMap((
|
||||
@@ -21,7 +21,7 @@ const maintainers = [
|
||||
) =>
|
||||
style.readme["current-maintainers"].map((m) => {
|
||||
const username = m.url.split("github.com/")?.pop();
|
||||
// check that they follow github.com/username pattern
|
||||
// Check that they follow github.com/username pattern.
|
||||
assert.assertExists(username);
|
||||
return username.toLowerCase();
|
||||
})
|
||||
@@ -29,7 +29,7 @@ const maintainers = [
|
||||
),
|
||||
];
|
||||
|
||||
// lowercase usernames of all maintainers in the current GH team
|
||||
// Lowercase usernames of all maintainers in the current GitHub team.
|
||||
const teamMembers = await octokit.teams
|
||||
.listMembersInOrg({
|
||||
...team,
|
||||
@@ -54,7 +54,9 @@ const syncMaintainers = async () => {
|
||||
});
|
||||
console.log(`Added ${m} to the ${team.org}/${team.team_slug} team.`);
|
||||
}
|
||||
console.log(`${toAdd.length} users added to the ${team.org}/${team.team_slug} team.`)
|
||||
console.log(
|
||||
`${toAdd.length} users added to the ${team.org}/${team.team_slug} team.`,
|
||||
);
|
||||
|
||||
for (const m of toRemove) {
|
||||
await octokit.teams.removeMembershipForUserInOrg({
|
||||
@@ -63,7 +65,9 @@ const syncMaintainers = async () => {
|
||||
});
|
||||
console.log(`Removed ${m} from the ${team.org}/${team.team_slug} team.`);
|
||||
}
|
||||
console.log(`${toRemove.length} users removed from the ${team.org}/${team.team_slug} team.`)
|
||||
console.log(
|
||||
`${toRemove.length} users removed from the ${team.org}/${team.team_slug} team.`,
|
||||
);
|
||||
};
|
||||
|
||||
await syncMaintainers();
|
||||
Reference in new issue
Block a user