From f320665851c8ca180b32011275a932d5fda0fb2b Mon Sep 17 00:00:00 2001 From: leemour Date: Wed, 18 Nov 2026 16:13:00 +0100 Subject: [PATCH 1/2] fix(kit): setup-github pushes main, not the branch checked out gh repo create --push sends the current branch. attio-cli ran it from its feature branch: that branch became the repository's default and took main's ruleset, and main was not pushed. Co-Authored-By: Claude Opus 5.5 --- bin/setup-github | 4 +++- changes/fix-setup-github-pushes-main.md | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 changes/fix-setup-github-pushes-main.md diff --git a/bin/setup-github b/bin/setup-github index 66b04bd..5108734 100755 --- a/bin/setup-github +++ b/bin/setup-github @@ -128,7 +128,9 @@ const main = async () => { process.stdout.write("main pushed\n") } } else { - gh(["repo", "create", REPO, "--public", "--description", description, "--source", ROOT, "--remote", "origin", "--push"]) + // --push would send the branch checked out, which on a feature branch becomes the default and takes the ruleset. + gh(["repo", "create", REPO, "--public", "--description", description, "--source", ROOT, "--remote", "origin"]) + git("push", "-q", "-u", "origin", "main") process.stdout.write(`${REPO} created and main pushed\n`) } gh(["repo", "edit", REPO, "--delete-branch-on-merge"]) diff --git a/changes/fix-setup-github-pushes-main.md b/changes/fix-setup-github-pushes-main.md new file mode 100644 index 0000000..8f0f633 --- /dev/null +++ b/changes/fix-setup-github-pushes-main.md @@ -0,0 +1,5 @@ +### Fixed + +- **`bin/setup-github` pushes `main`, whatever branch is checked out.** It created the repository with + `gh repo create --push`, which sends the current branch: run from a feature branch, that branch became the default + and took main's ruleset, and `main` was not on GitHub. From 396690538a7a95831fb97dbd30b5f904a0eeafc0 Mon Sep 17 00:00:00 2001 From: leemour Date: Wed, 18 Nov 2026 19:04:11 +0100 Subject: [PATCH 2/2] fix(kit): a CRM CLI made from a config lists people and companies live when their entity names a search from-config wrote LIVE with users only, so attio-cli mounted people and organizations list by hand. LIVE now names person and organization when the entity has a search, and the seed's crm.ts comment says so. Co-Authored-By: Claude Opus 5.5 --- changes/fix-setup-github-pushes-main.md | 3 +++ kit/seeds/config/scripts/from-config.ts | 16 +++++++++++----- kit/seeds/config/src/commands/crm.ts | 2 +- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/changes/fix-setup-github-pushes-main.md b/changes/fix-setup-github-pushes-main.md index 8f0f633..529b1cc 100644 --- a/changes/fix-setup-github-pushes-main.md +++ b/changes/fix-setup-github-pushes-main.md @@ -3,3 +3,6 @@ - **`bin/setup-github` pushes `main`, whatever branch is checked out.** It created the repository with `gh repo create --push`, which sends the current branch: run from a feature branch, that branch became the default and took main's ruleset, and `main` was not on GitHub. +- **A CRM CLI made from a config lists people and companies live when their entity names a `search`.** + `scripts/from-config.ts` wrote `LIVE` with users only, so a CLI with a people search had to mount `people list` and + `organizations list` by hand. diff --git a/kit/seeds/config/scripts/from-config.ts b/kit/seeds/config/scripts/from-config.ts index 3c7588c..9963ffc 100644 --- a/kit/seeds/config/scripts/from-config.ts +++ b/kit/seeds/config/scripts/from-config.ts @@ -26,6 +26,14 @@ if (functions.length) ) const verify = cli.auth.preset === "none" ? undefined : cli.auth.verify // A value the config leaves out is a bare `undefined`, so a command that still reads it fails typecheck, not a run. +const live = (): string[] => { + const source = cli.source as { entities?: Record; users?: unknown } | undefined + return [ + ...(["person", "organization"] as const).filter((kind) => source?.entities?.[kind]?.search !== undefined), + ...(source?.users ? ["user"] : []), + ] +} + const constant = (name: string, type: string, value: unknown) => value === undefined ? `export const ${name} = undefined` @@ -76,12 +84,10 @@ const text = formatted( "export const HOOK_OPTIONS: { hooks?: CrmManifestHooks } = {}", ]), "", - // What a CRM reads live: its users, when the source names a call for them. + // What a CRM reads live: people and companies whose entity names a search, and its users when the source names a + // call for them. ...(cli.category === "crm" - ? [ - `export const LIVE: readonly "user"[] = ${cli.source && "users" in cli.source && cli.source.users ? '["user"]' : "[]"}`, - "", - ] + ? [`export const LIVE: readonly ("person" | "organization" | "user")[] = ${JSON.stringify(live())}`, ""] : []), ].join("\n"), ) diff --git a/kit/seeds/config/src/commands/crm.ts b/kit/seeds/config/src/commands/crm.ts index 3ff454c..ddac6da 100644 --- a/kit/seeds/config/src/commands/crm.ts +++ b/kit/seeds/config/src/commands/crm.ts @@ -66,7 +66,7 @@ export const crmCommands = (): Command[] => { app: IDENTITY, open, leads: SOURCE.kinds.includes("lead"), - // People and companies have no live list in a manifest source yet; its users do. + // People and companies whose entity names a search, and the users when the source names a call for them. live: LIVE, }) return [...holder.commands]