Skip to content

AI-131 add members mutation commands#1329

Open
thebiglabasky wants to merge 1 commit into
mainfrom
herve/AI-131-account-member-cli-mutations
Open

AI-131 add members mutation commands#1329
thebiglabasky wants to merge 1 commit into
mainfrom
herve/AI-131-account-member-cli-mutations

Conversation

@thebiglabasky
Copy link
Copy Markdown
Contributor

@thebiglabasky thebiglabasky commented May 28, 2026

Summary

  • Add checkly members update <member> --role <role> for public account member role updates.
  • Add checkly members delete <member> for public account member removal.
  • Let <member> be either an email address or user ID. Email-like values are resolved through the account-scoped members list with an exact active-member email match; --email and --id force interpretation when needed.
  • Keep the existing checkly account members ... spelling as hidden compatibility aliases.
  • Route both mutations through the existing confirmation wrapper with --force and --dry-run, so agent/CI mode refuses to execute without explicit confirmation.
  • Extend account-member REST client types, command metadata coverage, root help topic metadata, pagination hints, and AI-context docs.

Dependency

Depends on checkly/monorepo#2053 for the public PATCH and DELETE account member endpoints.

Backend model note

Checked the monorepo schema: memberships is unique on (userId, accountId), while there is no (accountId, email) membership uniqueness constraint. The CLI therefore resolves email by exact active-member email match from the current account's public list response, then calls the userId mutation endpoint.

Validation

  • pnpm install (completed; emitted the expected simple-git-hooks warning for Codex worktree .git file)
  • pnpm --filter checkly run clean:dist && pnpm --filter checkly run prepare:dist && pnpm --filter checkly run prepack
  • pnpm exec eslint packages/cli/src/helpers/account-member-target.ts packages/cli/src/rest/account-members.ts packages/cli/src/commands/members.ts packages/cli/src/commands/members/update.ts packages/cli/src/commands/members/delete.ts packages/cli/src/commands/__tests__/account-members.spec.ts packages/cli/src/commands/__tests__/account-members-mutations.spec.ts packages/cli/src/commands/__tests__/command-metadata.spec.ts packages/cli/src/formatters/account-members.ts packages/cli/src/ai-context/context.ts
  • pnpm exec vitest --run src/commands/__tests__/account-members.spec.ts src/commands/__tests__/account-members-mutations.spec.ts src/commands/__tests__/command-metadata.spec.ts src/formatters/__tests__/account-members.spec.ts
  • Manual help checks for checkly members update, checkly members delete, and the legacy checkly account members ... alias.

@thebiglabasky thebiglabasky force-pushed the herve/AI-131-account-member-cli-mutations branch from fb2fe68 to 8de0c01 Compare May 28, 2026 23:17
@thebiglabasky thebiglabasky changed the title AI-131 add account member mutation commands AI-131 add members mutation commands May 28, 2026
@thebiglabasky thebiglabasky force-pushed the herve/AI-131-account-member-cli-mutations branch from 8de0c01 to eb80fd6 Compare May 28, 2026 23:24
@thebiglabasky thebiglabasky force-pushed the herve/AI-131-account-member-cli-mutations branch from eb80fd6 to 198cfc2 Compare May 29, 2026 07:16
@thebiglabasky thebiglabasky marked this pull request as ready for review May 29, 2026 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant