Skip to content

feat: Add reset password command - #121

Merged
alex289 merged 5 commits into
mainfrom
feature/reset_password_command
Apr 26, 2026
Merged

alex289 merged 5 commits into
mainfrom
feature/reset_password_command

Conversation

@alex289

@alex289 alex289 commented Apr 24, 2026 •

Copy link
Copy Markdown
Member

Type of change

  • 🐛 Bug fix
  • 🚀 New feature
  • ❓ Other (please specify)

Description

Add reset-password command to hub:

  • Receives user id or email
  • Sets a random password equal to the admin user update endpoint
  • Show info to user

@alex289
alex289 requested a review from timokoessler April 24, 2026 20:03
@alex289 alex289 self-assigned this Apr 24, 2026
Copilot AI review requested due to automatic review settings April 24, 2026 20:03
@alex289 alex289 added the enhancement New feature or request label Apr 24, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds an administrative hub reset-password subcommand to reset a local user’s password directly against the Hub database, returning a generated temporary password and forcing a password change on next login.

Changes:

  • Added reset-password Cobra command with --email / --id targeting and password reset logic.
  • Added unit tests for target normalization and password reset behavior (local + managed user rejection).
  • Added lipgloss (and related indirect deps) to render a styled CLI result card.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
backend/go.mod Adds lipgloss and required indirect terminal styling dependencies.
backend/go.sum Records checksums for newly added styling/terminal dependencies.
backend/cmd/hub/reset_password.go Implements the reset-password command, DB connect/close, reset logic, and output rendering.
backend/cmd/hub/reset_password_test.go Adds tests for normalization and reset behavior using a temporary SQLite DB.
backend/cmd/hub/main.go Registers the new reset-password subcommand on the hub root command.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread backend/cmd/hub/reset_password.go Outdated
Comment thread backend/cmd/hub/reset_password.go Outdated
Comment thread backend/cmd/hub/reset_password.go
@codecov

codecov Bot commented Apr 24, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 28.98551% with 98 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
backend/cmd/hub/reset_password.go 23.52% 84 Missing and 7 partials ⚠️
backend/internal/hub/db/db.go 66.66% 3 Missing and 3 partials ⚠️
backend/cmd/hub/main.go 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Comment thread backend/go.mod Outdated
Comment thread backend/cmd/hub/reset_password.go
@alex289
alex289 requested a review from timokoessler April 25, 2026 18:46
@alex289
alex289 enabled auto-merge (squash) April 25, 2026 18:46
Co-authored-by: Copilot <[email protected]>
Comment thread backend/internal/hub/db/db.go
Comment thread backend/internal/hub/db/db.go
@alex289
alex289 merged commit b191aad into main Apr 26, 2026
8 of 9 checks passed
@alex289
alex289 deleted the feature/reset_password_command branch April 26, 2026 12:18
@orcacd-bot orcacd-bot Bot mentioned this pull request Apr 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend enhancement New feature or request hub

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants