Skip to content

feat(repo): Implement Repository Update Command#714

Merged
bupd merged 5 commits into
goharbor:mainfrom
bhavyaKhatri2703:feat(repo)/Implement-repository-update-cmd
May 7, 2026
Merged

feat(repo): Implement Repository Update Command#714
bupd merged 5 commits into
goharbor:mainfrom
bhavyaKhatri2703:feat(repo)/Implement-repository-update-cmd

Conversation

@bhavyaKhatri2703

Copy link
Copy Markdown
Contributor

fixes #710

This pr adds a repo update command which can update the description of a repository.

@codecov

codecov Bot commented Feb 18, 2026

Copy link
Copy Markdown

Codecov Report

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

Files with missing lines Patch % Lines
cmd/harbor/root/repository/update.go 0.00% 43 Missing ⚠️
pkg/api/repository_handler.go 0.00% 21 Missing ⚠️
pkg/views/repository/update/view.go 0.00% 18 Missing ⚠️
cmd/harbor/root/repository/cmd.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             main    #714      +/-   ##
=========================================
- Coverage   10.99%   7.41%   -3.58%     
=========================================
  Files         173     263      +90     
  Lines        8671   13104    +4433     
=========================================
+ Hits          953     972      +19     
- Misses       7612   12023    +4411     
- Partials      106     109       +3     

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

@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! I was wondering whether it makes sense to make --description flag optional and follow conventions for other update commands to open a view form where you can enter the description. Additionally, I guess it would be better to fetch the upstream repo api object first, update and then push the update instead of creating a new repo object without the other info. Could you also please add screenshots or a small screen record to demonstrate the working command.

Comment thread cmd/harbor/root/repository/update.go Outdated
Comment thread pkg/api/repository_handler.go
Signed-off-by: bhavyaKhatri2703 <khatribhavya2703@gmail.com>
Signed-off-by: bhavyaKhatri2703 <khatribhavya2703@gmail.com>
@bhavyaKhatri2703

Copy link
Copy Markdown
Contributor Author

@qcserestipy can u pls have a look again ive made the changes suggested , thanks.

@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!
Thanks for the contribution

@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 d691d4e into goharbor:main May 7, 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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement repository update cmd

4 participants