Skip to content

fix: make comment field optional in user create command#629

Merged
bupd merged 1 commit into
goharbor:mainfrom
Sypher845:fix/user-create-optional-comment
Feb 17, 2026
Merged

fix: make comment field optional in user create command#629
bupd merged 1 commit into
goharbor:mainfrom
Sypher845:fix/user-create-optional-comment

Conversation

@Sypher845

Copy link
Copy Markdown
Contributor

Fixes #628
The user create command previously required ALL fields including the optional comment field for non-interactive mode. Now users can create accounts with only the required fields

@codecov

codecov Bot commented Jan 22, 2026

Copy link
Copy Markdown

Codecov Report

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

Files with missing lines Patch % Lines
cmd/harbor/root/user/create.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             main    #629      +/-   ##
=========================================
- Coverage   10.99%   7.16%   -3.84%     
=========================================
  Files         173     260      +87     
  Lines        8671   12876    +4205     
=========================================
- Hits          953     922      -31     
- Misses       7612   11846    +4234     
- 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.

@bupd bupd self-requested a review January 22, 2026 18:06
@bupd bupd added the bug Something isn't working label Jan 22, 2026

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

Could also probably add an (optional) to the description string. (for -h help)
Everything else works as intended.

@Sypher845 Sypher845 force-pushed the fix/user-create-optional-comment branch 2 times, most recently from 4c9d94f to 7eba311 Compare February 6, 2026 13:32
@Sypher845

Copy link
Copy Markdown
Contributor Author

@NucleoFusion done. Please take a look

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

@Sypher845 merge conflicts

Signed-off-by: Sypher845 <suyashpatil845@gmail.com>
@Sypher845 Sypher845 force-pushed the fix/user-create-optional-comment branch from db6f753 to a27fd9f Compare February 10, 2026 19:49
@Sypher845

Copy link
Copy Markdown
Contributor Author

@bupd solved the conflicts, PTAL :)

@Sypher845 Sypher845 requested a review from bupd February 10, 2026 19:54

@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 ca14e69 into goharbor:main Feb 17, 2026
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

user create command requires ALL fields including the optional comment field

4 participants