feat: implement user deletion via pullbasectl CLI#2
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR introduces a new ChangesDelete user command
🎯 2 (Simple) | ⏱️ ~12 minutes
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.12.2)level=error msg="Running error: context loading failed: no go files to analyze: running Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
feat: implement user deletion via
pullbasectlSummary
Adds
pullbasectl users delete— a CLI subcommand for deleting a user account.This was previously noted in the documentation as a planned capability (the web UI and REST API already supported deletion; the CLI did not).
A companion docs PR will be opened at pullbase/docs that updates the CLI reference and workflow guide to reflect this change.
Changes
server/cmd/pullbasectl/users.gorunUsersDelete— parses--user-idand--delete-acct-usernameflags, validates inputs, sends aDELETE /api/v1/users/{userID}request with the confirmation username in the request body, and prints a success message on receiving a204 No Contentresponse.server/cmd/pullbasectl/root.gonewUsersDeleteCommand()and registered it under theuserssubcommand group alongside the existinglistandcreatecommands.server/cmd/pullbasectl/tokens_commands_test.goTestRunUsersDelete— spins up anhttptestserver, verifies the correct HTTP method,Authorizationheader, path value, andconfirm_usernamebody field, and asserts the success output.Usage
Flags
--user-id--delete-acct-username--server-urlTesting
All existing tests continue to pass:
Summary by CodeRabbit
New Features
users deletesubcommand to the CLI that enables user account deletion with built-in confirmation validation and authentication checks.Tests