Skip to content

feat: reset admin credentials and enforce PR size limit - #17

Merged
MengMengCode merged 1 commit into
masterfrom
feat/admin-credentials-pr-limit
Aug 14, 2026
Merged

MengMengCode merged 1 commit into
masterfrom
feat/admin-credentials-pr-limit

Conversation

@MengMengCode

Copy link
Copy Markdown
Owner

Summary

  • allow the root-only CLI management menu to reset the administrator username and password without requiring the previous password
  • keep the current username when the username prompt is left empty
  • revoke existing Web sessions after credentials change
  • add a 5,000 changed-line pull request limit that automatically closes oversized PRs

Validation

  • go test ./cmd/... ./internal/... ./web -count=1 -timeout 180s
  • credential reset tests cover username/password replacement, old credential rejection, session revocation, and invalid input
  • PR limit shell script passes Bash syntax validation

Copilot AI lite review requested due to automatic review settings August 14, 2026 12:36
@MengMengCode
MengMengCode merged commit 812bfe7 into master Aug 14, 2026
7 checks passed

Copilot AI 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.

Pull request overview

This PR adds a root-only recovery flow to reset the administrator username/password (without needing the previous password), revokes existing sessions when credentials change, and introduces a GitHub Actions workflow to automatically close pull requests exceeding a 5,000 changed-line limit.

Changes:

  • Add ResetAdminCredentials to the auth service with input validation and session revocation on credential changes.
  • Update the root management CLI menu to reset admin credentials and keep the existing username when the prompt is left empty.
  • Add a pull_request_target workflow that enforces a 5,000 changed-line PR limit by closing oversized PRs.

Reviewed changes

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

Show a summary per file
File Description
internal/auth/service.go Adds ResetAdminCredentials recovery API layered on EnsureAdmin.
internal/auth/service_test.go Adds tests for reset behavior, invalid input, and session revocation.
cmd/vocat/menu.go Replaces “change password” flow with a “reset credentials” flow and new username prompt behavior.
cmd/vocat/menu_test.go Adds a prompt regression test ensuring no “current password” prompt is shown.
.github/workflows/pr-size-limit.yml Adds an Actions workflow to close PRs exceeding 5,000 changed lines and comment on the PR.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/pr-size-limit.yml
Comment thread cmd/vocat/menu.go
@MengMengCode
MengMengCode deleted the feat/admin-credentials-pr-limit branch August 14, 2026 12:40
MengMengCode added a commit that referenced this pull request Aug 15, 2026
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.

2 participants