Skip to content

feat(user): add confirm password field to user create command#683

Merged
bupd merged 1 commit into
goharbor:mainfrom
Sypher845:feat/refine-user-create-command
Feb 10, 2026
Merged

feat(user): add confirm password field to user create command#683
bupd merged 1 commit into
goharbor:mainfrom
Sypher845:feat/refine-user-create-command

Conversation

@Sypher845

Copy link
Copy Markdown
Contributor
image

Fixes #673

  1. Confirm password field added to the user create command
  2. the comment field optional indicator is handled in fix: make comment field optional in user create command #629
  3. For the toggle,
    views use charmbracelet/huh library. The EchoMode is set at form creation time and cannot be dynamically toggled during input.

@codecov

codecov Bot commented Feb 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 7.17%. Comparing base (60ad0bd) to head (c4e61f0).
⚠️ Report is 85 commits behind head on main.

Files with missing lines Patch % Lines
pkg/views/user/create/view.go 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             main    #683      +/-   ##
=========================================
- Coverage   10.99%   7.17%   -3.82%     
=========================================
  Files         173     260      +87     
  Lines        8671   12853    +4182     
=========================================
- Hits          953     922      -31     
- Misses       7612   11823    +4211     
- Partials      106     108       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Sypher845 Sypher845 force-pushed the feat/refine-user-create-command branch from 13b0150 to 53ef74a Compare February 6, 2026 17:07
@Sypher845

Copy link
Copy Markdown
Contributor Author

@NucleoFusion Please take a look

@NucleoFusion

Copy link
Copy Markdown
Contributor

for 2. I meant in the createView. Like the form you see in the image you have attached.
Adding an (optional) in here.
The other PR handles for the command commment iirc

@Sypher845

Sypher845 commented Feb 6, 2026

Copy link
Copy Markdown
Contributor Author

Actually I added it in the PR #629 , as it was related to comment
I made the changes currently.

@NucleoFusion

Copy link
Copy Markdown
Contributor

OKay no worries,
Is the toggle not possible?

@Sypher845

Copy link
Copy Markdown
Contributor Author

It is not possible,
As in the current use of huh library, the Ecomode is set at form creation, so it cannot be changed during input

@NucleoFusion

Copy link
Copy Markdown
Contributor

What do you mean? Are we not creating the form and then running it? I am sounding stupid lol

@Sypher845

Sypher845 commented Feb 6, 2026

Copy link
Copy Markdown
Contributor Author

We are creating form , The Echomode for password which is set EchoMode(huh.EchoModePassword) is like keep it hidden ( like *****). After the form.Run() is called, the forms state become static, we cannot change this during the run or when we input :)

@NucleoFusion

Copy link
Copy Markdown
Contributor

Okay, I see
Its fine then

@qcserestipy qcserestipy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you for the contribution. Before approving this, we should consider whether a confirmation flag is actually needed for the CLI command.

Comment thread doc/cli-docs/harbor-user-create.md Outdated
@NucleoFusion

Copy link
Copy Markdown
Contributor

I agree, having it as a flag seems redundant. For the prompt view it makes sense.

@Sypher845

Copy link
Copy Markdown
Contributor Author

@qcserestipy @NucleoFusion ok so i will just remove it

@Sypher845 Sypher845 force-pushed the feat/refine-user-create-command branch from 53ef74a to 6e3cb3b Compare February 7, 2026 22:01
@Sypher845

Copy link
Copy Markdown
Contributor Author

@qcserestipy PTAL

@Sypher845 Sypher845 requested a review from qcserestipy February 7, 2026 22:04
Signed-off-by: Sypher845 <suyashpatil845@gmail.com>
@Sypher845 Sypher845 force-pushed the feat/refine-user-create-command branch from 6e3cb3b to c4e61f0 Compare February 7, 2026 22:17
@Sypher845

Copy link
Copy Markdown
Contributor Author

Changed the commit name.
I am not able to edit the PR name, as the edit button is not showing for me

@qcserestipy qcserestipy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@bupd bupd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm

@bupd bupd merged commit 19a6116 into goharbor:main Feb 10, 2026
6 of 8 checks passed
adityachopra29 pushed a commit to adityachopra29/harbor-cli that referenced this pull request Mar 5, 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.

enhancement: Refine the user create command flags and more

4 participants