ci(lint): validate name metadata (#402)
Co-authored-by: winston <[email protected]>
This commit is contained in:
1 parent
8da437f9f2
commit
5bb6f6db1e
14 files changed
+96
-67
No files matched your search
@@ -1,23 +1,17 @@
|
||||
#!/usr/bin/env -S deno run -A
|
||||
import * as assert from "std/assert/mod.ts";
|
||||
import * as path from "std/path/mod.ts";
|
||||
import { Octokit } from "@octokit/rest";
|
||||
|
||||
import { REPO_ROOT, userStylesSchema } from "@/deps.ts";
|
||||
import type { UserStylesSchema } from "@/types/mod.ts";
|
||||
import { validateYaml } from "@/utils.ts";
|
||||
import { UserstylesSchema } from "@/types/userstyles.d.ts";
|
||||
import { getUserstylesData } from "@/utils.ts";
|
||||
|
||||
const octokit = new Octokit({ auth: Deno.env.get("GITHUB_TOKEN") });
|
||||
const team = { org: "catppuccin", team_slug: "userstyles-maintainers" };
|
||||
|
||||
const userstylesData = await validateYaml<UserstylesSchema>(
|
||||
Deno.readTextFileSync(path.join(REPO_ROOT, "scripts/userstyles.yml")),
|
||||
userStylesSchema,
|
||||
);
|
||||
if (userstylesData.userstyles === undefined) {
|
||||
const userstylesData = await getUserstylesData().catch((err) => {
|
||||
console.error(err);
|
||||
Deno.exit(1);
|
||||
}
|
||||
});
|
||||
|
||||
// lowercase usernames of all the "current-maintainers" in the file
|
||||
const maintainers = [
|
||||
|
||||
Reference in new issue
Block a user