Skip to content

Feature: Updating the Project Member Commands#540

Merged
bupd merged 29 commits into
goharbor:mainfrom
NucleoFusion:feat/project-member
Sep 16, 2025
Merged

Feature: Updating the Project Member Commands#540
bupd merged 29 commits into
goharbor:mainfrom
NucleoFusion:feat/project-member

Conversation

@NucleoFusion

@NucleoFusion NucleoFusion commented Sep 3, 2025

Copy link
Copy Markdown
Contributor

Updating and fixing #85 's progress on Project Member Commands.

Checklist

Major

  • For creation, some fields such as GroupID and UserID are difficult to for a user to remember, so maybe move to using names for them, with a selection list like it is for project.
  • View command and the Update command, imo, should work with username instead of id, and maybe --id as a flag. They already do that, fix the docs then.
  • The update bubbletea view is broken (I think two of the models are being shown at once)
  • Also in these fields, an (optional) / required label should be there
  • Mismatch in conventions, list/update/view have projectName as a subcommand variable whereas create/delete uses a flag --project.
  • Adding fuzzy search for the project selector

Minor

  • The bubbletea instance uses full screen, which I think should only use as much as required (makes it look more like a TUI instead of CLI)
  • Convert the forms into a step-by-step form instead of an all at once. (Kinda like each step is its seperate view?).

EDIT

  • Add a --search flag

@codecov

codecov Bot commented Sep 3, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0.14577% with 685 lines in your changes missing coverage. Please review.
✅ Project coverage is 6.73%. Comparing base (60ad0bd) to head (9898a88).
⚠️ Report is 47 commits behind head on main.

Files with missing lines Patch % Lines
pkg/api/member_handler.go 0.00% 151 Missing ⚠️
cmd/harbor/root/project/member/create.go 0.00% 77 Missing ⚠️
cmd/harbor/root/project/member/delete.go 0.00% 61 Missing ⚠️
cmd/harbor/root/project/member/list.go 0.00% 61 Missing ⚠️
cmd/harbor/root/project/member/update.go 0.00% 58 Missing ⚠️
pkg/views/member/create/view.go 0.00% 58 Missing ⚠️
pkg/views/member/select/view.go 0.00% 42 Missing ⚠️
pkg/views/member/list/view.go 0.00% 40 Missing ⚠️
pkg/views/member/view/view.go 0.00% 40 Missing ⚠️
pkg/utils/utils.go 3.44% 28 Missing ⚠️
... and 6 more
Additional details and impacted files
@@            Coverage Diff            @@
##             main    #540      +/-   ##
=========================================
- Coverage   10.99%   6.73%   -4.26%     
=========================================
  Files         173     253      +80     
  Lines        8671   15251    +6580     
=========================================
+ Hits          953    1027      +74     
- Misses       7612   14117    +6505     
- Partials      106     107       +1     

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

@NucleoFusion NucleoFusion force-pushed the feat/project-member branch 2 times, most recently from 0b52fb6 to 8df5050 Compare September 4, 2025 09:59
@NucleoFusion NucleoFusion marked this pull request as ready for review September 4, 2025 10:11
@bupd bupd self-requested a review September 8, 2025 17:58

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

@NucleoFusion Thanks for your contributions

I have added some suggestions for improvements

Comment thread pkg/api/member_handler.go Outdated
Comment thread cmd/harbor/root/project/member/list.go Outdated
Comment thread cmd/harbor/root/project/member/list.go
Comment thread cmd/harbor/root/project/member/view.go Outdated
Comment thread cmd/harbor/root/project/member/view.go Outdated
Comment thread cmd/harbor/root/project/member/view.go Outdated
Comment thread cmd/harbor/root/project/member/update.go Outdated
Comment thread cmd/harbor/root/project/member/update.go
Comment thread cmd/harbor/root/project/member/delete.go
Comment thread cmd/harbor/root/project/member/create.go
@NucleoFusion

NucleoFusion commented Sep 11, 2025

Copy link
Copy Markdown
Contributor Author

TODO

  • --search flag in list members

@NucleoFusion NucleoFusion requested a review from bupd September 12, 2025 11:26
@bupd

bupd commented Sep 12, 2025

Copy link
Copy Markdown
Member

@NucleoFusion Please do rebase this

@NucleoFusion

Copy link
Copy Markdown
Contributor Author

alright let me do that right now

@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 and others added 18 commits September 16, 2025 18:47
Signed-off-by: bupd <bupdprasanth@gmail.com>
Signed-off-by: bupd <bupdprasanth@gmail.com>
Signed-off-by: bupd <bupdprasanth@gmail.com>
Signed-off-by: bupd <bupdprasanth@gmail.com>
Signed-off-by: bupd <bupdprasanth@gmail.com>
Signed-off-by: bupd <bupdprasanth@gmail.com>
Signed-off-by: bupd <bupdprasanth@gmail.com>
Signed-off-by: bupd <bupdprasanth@gmail.com>
Signed-off-by: bupd <bupdprasanth@gmail.com>
Signed-off-by: bupd <bupdprasanth@gmail.com>
Signed-off-by: bupd <bupdprasanth@gmail.com>
Improves the member deletion workflow by refactoring the command-line interface and API handler. This change simplifies the user prompt and clarifies the deletion logic.

Signed-off-by: NucleoFusion <lakshit.singh.mail@gmail.com>
…y as much space a required

Signed-off-by: NucleoFusion <lakshit.singh.mail@gmail.com>
…g the projectName convention in member commands (arg)

Signed-off-by: NucleoFusion <lakshit.singh.mail@gmail.com>
… and removing full screen usage by model view

Signed-off-by: NucleoFusion <lakshit.singh.mail@gmail.com>
Signed-off-by: NucleoFusion <lakshit.singh.mail@gmail.com>
…ate clash

Signed-off-by: NucleoFusion <lakshit.singh.mail@gmail.com>
Signed-off-by: NucleoFusion <lakshit.singh.mail@gmail.com>
Signed-off-by: NucleoFusion <lakshit.singh.mail@gmail.com>
Signed-off-by: NucleoFusion <lakshit.singh.mail@gmail.com>
…r appropriate parsing of projectNameOrID

Signed-off-by: NucleoFusion <lakshit.singh.mail@gmail.com>
…found in update cmd

Signed-off-by: NucleoFusion <lakshit.singh.mail@gmail.com>
Signed-off-by: NucleoFusion <lakshit.singh.mail@gmail.com>
…or membernames as well

Signed-off-by: NucleoFusion <lakshit.singh.mail@gmail.com>
… cmd

Signed-off-by: NucleoFusion <lakshit.singh.mail@gmail.com>
Signed-off-by: NucleoFusion <lakshit.singh.mail@gmail.com>
Signed-off-by: NucleoFusion <lakshit.singh.mail@gmail.com>
Signed-off-by: NucleoFusion <lakshit.singh.mail@gmail.com>
Signed-off-by: NucleoFusion <lakshit.singh.mail@gmail.com>
@bupd bupd merged commit f0b4514 into goharbor:main Sep 16, 2025
7 of 9 checks passed
@NucleoFusion NucleoFusion changed the title [WIP] Updating the Project Member Commands Feature: Updating the Project Member Commands Sep 16, 2025
@qcserestipy qcserestipy mentioned this pull request Nov 5, 2025
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