diff --git a/AGENTS.md b/AGENTS.md index ca40cb52a..a175f3875 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -47,6 +47,7 @@ - When working on an issue: reference the issue in the changelog entry. - When merging a PR: leave a PR comment that explains exactly what we did and include the SHA hashes. - When merging a PR from a new contributor: add their avatar to the README “Thanks to all clawtributors” thumbnail list. +- After merging a PR: run `bun scripts/update-clawtributors.ts` if the contributor is missing, then commit the regenerated README. ### PR Workflow (Review vs Land) - **Review mode (PR link only):** read `gh pr view/diff`; **do not** switch branches; **do not** change code. diff --git a/README.md b/README.md index 2fae9b001..660808a2e 100644 --- a/README.md +++ b/README.md @@ -447,11 +447,9 @@ AI/vibe-coded PRs welcome! 🤖 Thanks to all clawtributors:
diff --git a/scripts/clawtributors-map.json b/scripts/clawtributors-map.json new file mode 100644 index 000000000..657de666c --- /dev/null +++ b/scripts/clawtributors-map.json @@ -0,0 +1,40 @@ +{ + "ensureLogins": [ + "jdrhyne", + "manmal" + ], + "displayName": { + "jdrhyne": "Jonathan D. Rhyne (DJ-D)" + }, + "nameToLogin": { + "azade": "azade-c", + "eng. juan combetto": "omniwired", + "mariano belinky": "mbelinky", + "kit": "kitze", + "vasanth rao naik sabavat": "vsabavat", + "tobias bischoff": "tobiasbischoff", + "tu nombre real": "nachx639", + "william stock": "wstock", + "abhisekbasu1": "AbhisekBasu1", + "manuelhettich": "manuelhettich", + "iamadig": "Iamadig", + "django navarro": "djangonavarro220", + "erik": "erikpr1994", + "jonathan d. rhyne": "jdrhyne", + "jonathan rhyne": "jdrhyne", + "manuel maly": "manmal", + "manuel mali": "manmal" + }, + "emailToLogin": { + "manuel.maly@gmail.com": "manmal", + "omniwired@gmail.com": "omniwired", + "mbelinky@gmail.com": "mbelinky", + "vsabavat@nvidia.com": "vsabavat", + "nacho639@gmail.com": "nachx639", + "w.stock@yahoo.com": "wstock", + "rltorres26+github@gmail.com": "RandyVentures", + "hixvac@gmail.com": "VACInc", + "djangonavarro220@gmail.com": "djangonavarro220", + "erikpastorrios1994@gmail.com": "erikpr1994" + } +} diff --git a/scripts/update-clawtributors.ts b/scripts/update-clawtributors.ts new file mode 100644 index 000000000..e49b68ac9 --- /dev/null +++ b/scripts/update-clawtributors.ts @@ -0,0 +1,272 @@ +import { execSync } from "node:child_process"; +import { readFileSync, writeFileSync } from "node:fs"; +import { resolve } from "node:path"; + +const REPO = "clawdbot/clawdbot"; +const PER_LINE = 10; + +type MapConfig = { + ensureLogins?: string[]; + displayName?: Record'); +const end = readme.indexOf("
", start); + +if (start === -1 || end === -1) { + throw new Error("README.md missing clawtributors block"); +} + +const next = `${readme.slice(0, start)}\n${block}${readme.slice(end)}`;
+writeFileSync(readmePath, next);
+
+console.log(`Updated README clawtributors: ${entries.length} entries`);
+
+function run(cmd: string): string {
+ return execSync(cmd, {
+ encoding: "utf8",
+ stdio: ["ignore", "pipe", "pipe"],
+ maxBuffer: 1024 * 1024 * 200,
+ }).trim();
+}
+
+function parsePaginatedJson(raw: string): any[] {
+ const items: any[] = [];
+ for (const line of raw.split("\n")) {
+ if (!line.trim()) {
+ continue;
+ }
+ const parsed = JSON.parse(line);
+ if (Array.isArray(parsed)) {
+ items.push(...parsed);
+ } else {
+ items.push(parsed);
+ }
+ }
+ return items;
+}
+
+function normalizeMap(map: Record