Skip to content

docs: admin users create のヘルプをAPI仕様に合わせて改善#77

Merged
miya0001 merged 1 commit into
mainfrom
fix-users-create-help
Mar 19, 2026
Merged

docs: admin users create のヘルプをAPI仕様に合わせて改善#77
miya0001 merged 1 commit into
mainfrom
fix-users-create-help

Conversation

@miya0001

@miya0001 miya0001 commented Mar 19, 2026

Copy link
Copy Markdown
Member

Summary

  • geonic admin users create のヘルプ表示をGeonicDBサーバーの実装に合わせて修正
  • JSON payload example に tenantId フィールドを追加し、有効なロール一覧を記載
  • Examples から super_admin の例を削除し、tenant_admin(テナント管理者)と user(一般ユーザー)の例を追加

Test plan

  • npm run lint パス
  • npm run typecheck パス
  • npm test 全624テストパス
  • geonic admin users create --help で新しいヘルプ表示を確認

Summary by CodeRabbit

ドキュメント

  • ユーザー作成コマンドのドキュメントを更新しました。テナント管理者またはテナントユーザーロールの作成時に、テナントIDの入力が必須となりました。

- JSON payload example に tenantId フィールドを追加
- 有効なロール一覧(super_admin, tenant_admin, user)を記載
- tenantId の必須条件を説明に追記
- Examples から super_admin の例を削除し、tenant_admin / user の例を追加
@coderabbitai

coderabbitai Bot commented Mar 19, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

src/commands/admin/users.tsのユーザー作成コマンドのヘルプテキストと例が更新されました。デフォルトロール指定が"role": "super_admin"からテナントスコープのロール("role": "tenant_admin"または"role": "user")に変更され、必須の"tenantId"パラメータが追加されました。

Changes

Cohort / File(s) Summary
ユーザー作成コマンドのドキュメント更新
src/commands/admin/users.ts
ユーザー作成コマンドのヘルプテキストとインライン例を更新。デフォルトロールからテナントスコープのロール(tenant_adminuser)への変更を反映し、tenantIdの必須条件を文書化。作成例を1つから2つのテナントロール例に置き換え。

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3分

Poem

🐰 ヘルプテキストが輝く日、
テナントの役割が明確に、
例示も二つ、美しく並ぶ、
ユーザー作成、スムーズに進む!✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PRのタイトルは、adminユーザー作成コマンドのヘルプをAPI仕様に合わせて改善することを明確に説明しており、実際の変更内容と完全に関連しています。

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-users-create-help
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/commands/admin/users.ts (1)

108-108: ロール値の不整合

更新コマンドの例で使用されている "role": "admin" が、作成コマンドで文書化された有効なロール(super_admin, tenant_admin, user)と一致していません。一貫性を保つため、この例も有効なロール値のいずれかに更新することを検討してください。

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/commands/admin/users.ts` at line 108, The example update payload in
src/commands/admin/users.ts uses an invalid role value ("admin"); change that
example (the string '  e.g. {"role": "admin"}') to use one of the documented
valid roles (e.g. "tenant_admin", "super_admin", or "user") so it matches the
create command documentation and remains consistent; update the example to a
specific valid value such as '  e.g. {"role": "tenant_admin"}' wherever the
update command example is defined.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/commands/admin/users.ts`:
- Line 108: The example update payload in src/commands/admin/users.ts uses an
invalid role value ("admin"); change that example (the string '  e.g. {"role":
"admin"}') to use one of the documented valid roles (e.g. "tenant_admin",
"super_admin", or "user") so it matches the create command documentation and
remains consistent; update the example to a specific valid value such as '  e.g.
{"role": "tenant_admin"}' wherever the update command example is defined.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: de15cc40-835c-412b-98f4-1683e9d8981c

📥 Commits

Reviewing files that changed from the base of the PR and between c5b6c16 and a063387.

📒 Files selected for processing (1)
  • src/commands/admin/users.ts

@miya0001
miya0001 merged commit 745ca86 into main Mar 19, 2026
11 of 13 checks passed
@miya0001
miya0001 deleted the fix-users-create-help branch March 19, 2026 06:58
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