Skip to content

fix(user): pass populated PasswordChangeView to ResetPassword#734

Merged
bupd merged 1 commit into
goharbor:mainfrom
yimtun:fix/reset-password-view
Mar 16, 2026
Merged

fix(user): pass populated PasswordChangeView to ResetPassword#734
bupd merged 1 commit into
goharbor:mainfrom
yimtun:fix/reset-password-view

Conversation

@yimtun

@yimtun yimtun commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

Fix a bug where resetView was not passed to api.ResetPassword.

The interactive password input populates resetView, but the API call used opts, which may not contain the updated password.

This PR passes the populated resetView to the API instead.

@codecov

codecov Bot commented Mar 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 7.53%. Comparing base (60ad0bd) to head (eb9e6c2).
⚠️ Report is 115 commits behind head on main.

Files with missing lines Patch % Lines
cmd/harbor/root/user/password.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             main    #734      +/-   ##
=========================================
- Coverage   10.99%   7.53%   -3.46%     
=========================================
  Files         173     261      +88     
  Lines        8671   13012    +4341     
=========================================
+ Hits          953     980      +27     
- Misses       7612   11922    +4310     
- Partials      106     110       +4     

☔ 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.

@yimtun yimtun force-pushed the fix/reset-password-view branch 2 times, most recently from c0ff146 to 0d34f87 Compare March 9, 2026 03:17
Add basic unit tests for password command to improve coverage.

Signed-off-by: yimtun <yim.tune@gmail.com>
@yimtun yimtun force-pushed the fix/reset-password-view branch from 0d34f87 to eb9e6c2 Compare March 9, 2026 03:25

@NucleoFusion NucleoFusion 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.

lgtm

@NucleoFusion

Copy link
Copy Markdown
Contributor

@bupd could we get this merged? since someone else wants to solve an issue related to the user password command.

Context

Current parameter, which is opts, is always an empty struct. Passing the new resetView makes it populated with the output from the intereactives password inputs

@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 dcfe949 into goharbor:main Mar 16, 2026
6 of 8 checks passed
AMAN-sharma07 pushed a commit to AMAN-sharma07/harbor-cli that referenced this pull request Mar 26, 2026
…or#734)

Add basic unit tests for password command to improve coverage.

Signed-off-by: yimtun <yim.tune@gmail.com>
NishchayRajput pushed a commit to NishchayRajput/harbor-cli that referenced this pull request Mar 28, 2026
…or#734)

Add basic unit tests for password command to improve coverage.

Signed-off-by: yimtun <yim.tune@gmail.com>
Signed-off-by: Nishchay Rajput <nishchayr@iitbhilai.ac.in>
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.

3 participants