comfy-pr 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bot/cli.ts +51 -0
- package/package.json +1 -1
package/bot/cli.ts
CHANGED
|
@@ -38,6 +38,7 @@ import yaml from "yaml";
|
|
|
38
38
|
|
|
39
39
|
// Notion ability
|
|
40
40
|
import { searchNotion } from "@/lib/notion/search";
|
|
41
|
+
import { fetchPeopleMappings, findSlackIdByGithubUsername } from "@/lib/notion/people";
|
|
41
42
|
|
|
42
43
|
// Video ability
|
|
43
44
|
import { readVideo } from "@/lib/video/read-video";
|
|
@@ -894,6 +895,56 @@ async function main() {
|
|
|
894
895
|
}
|
|
895
896
|
},
|
|
896
897
|
)
|
|
898
|
+
.command(
|
|
899
|
+
"notion people",
|
|
900
|
+
"List GitHub→Slack mappings from Notion People database",
|
|
901
|
+
(y) =>
|
|
902
|
+
y
|
|
903
|
+
.option("github", {
|
|
904
|
+
alias: "g",
|
|
905
|
+
type: "string",
|
|
906
|
+
describe: "Look up a specific GitHub username",
|
|
907
|
+
})
|
|
908
|
+
.option("missing", {
|
|
909
|
+
alias: "m",
|
|
910
|
+
type: "boolean",
|
|
911
|
+
describe: "Show active members missing a GitHub username",
|
|
912
|
+
default: false,
|
|
913
|
+
}),
|
|
914
|
+
async (args) => {
|
|
915
|
+
await loadEnvLocal();
|
|
916
|
+
const mappings = await fetchPeopleMappings();
|
|
917
|
+
|
|
918
|
+
if (args.github) {
|
|
919
|
+
const slackId = await findSlackIdByGithubUsername(args.github);
|
|
920
|
+
if (slackId) {
|
|
921
|
+
const entry = mappings.find(
|
|
922
|
+
(m) => m.githubUsername.toLowerCase() === args.github!.toLowerCase(),
|
|
923
|
+
);
|
|
924
|
+
console.log(yaml.stringify({ github: args.github, slackId, person: entry?.person }));
|
|
925
|
+
} else {
|
|
926
|
+
console.log(`No mapping found for GitHub username: ${args.github}`);
|
|
927
|
+
process.exit(1);
|
|
928
|
+
}
|
|
929
|
+
} else if (args.missing) {
|
|
930
|
+
const missing = mappings.filter((m) => !m.inactive && !m.githubUsername);
|
|
931
|
+
console.log(`Active members without GitHub username: ${missing.length}\n`);
|
|
932
|
+
console.log(yaml.stringify(missing));
|
|
933
|
+
} else {
|
|
934
|
+
const active = mappings.filter((m) => !m.inactive && m.slackId);
|
|
935
|
+
console.log(`Active people mappings: ${active.length}\n`);
|
|
936
|
+
console.log(
|
|
937
|
+
yaml.stringify(
|
|
938
|
+
active.map((m) => ({
|
|
939
|
+
person: m.person || "(unnamed)",
|
|
940
|
+
github: m.githubUsername || "(not set)",
|
|
941
|
+
slackId: m.slackId,
|
|
942
|
+
})),
|
|
943
|
+
),
|
|
944
|
+
);
|
|
945
|
+
}
|
|
946
|
+
},
|
|
947
|
+
)
|
|
897
948
|
.command(
|
|
898
949
|
"registry search",
|
|
899
950
|
"Search ComfyUI custom nodes registry",
|