Add: Project Robot Account Management commands#101
Closed
bupd wants to merge 11 commits into
Closed
Conversation
3086a3f to
069253e
Compare
0d6d134 to
a0a9b98
Compare
Member
Author
Member
|
@bupd can you rebase |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces project-wide robot account management commands to the harbor CLI. It adds new CLI commands for listing, viewing, creating, updating, refreshing, and deleting robot accounts, along with corresponding interactive views and API handlers.
Reviewed Changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/views/styles.go | Added WhiteStyle for styling consistency. |
| pkg/views/robot/update/view.go | Implements interactive update form for robot accounts. |
| pkg/views/robot/select/view.go | Adds selection views for robot permissions and accounts. |
| pkg/views/robot/list/view.go | Implements listing view with formatted robot account details. |
| pkg/views/robot/create/view.go | Provides interactive form for creating robot accounts. |
| pkg/views/project/select/view.go | Enhances project selection with an additional ProjectListID. |
| pkg/views/base/multiselect/model.go | Adds multiselect model for picking permissions. |
| pkg/utils/utils.go | Adds utilities for saving JSON payloads and reading secrets. |
| pkg/prompt/prompt.go | Updates prompt logic for retrieving project and robot IDs and permissions. |
| pkg/constants/constants.go | Introduces new constants related to robot and project query strings. |
| pkg/api/robot_handler.go | Implements API handlers for robot commands (list, get, create, update, delete, refresh). |
| cmd/harbor/root/project/robot/view.go | Implements “view” command for fetching and displaying robot details. |
| cmd/harbor/root/project/robot/update.go | Implements “update” command with an interactive view for updating robot accounts. |
| cmd/harbor/root/project/robot/refresh.go | Implements “refresh” command to update the robot secret with clipboard support. |
| cmd/harbor/root/project/robot/list.go | Implements “list” command for displaying robot accounts. |
| cmd/harbor/root/project/robot/delete.go | Implements “delete” command for removing a robot account. |
| cmd/harbor/root/project/robot/create.go | Implements “create” command with interactive prompts and secret management. |
| cmd/harbor/root/project/robot.go | Aggregates all robot account commands under the “robot” subcommand. |
| cmd/harbor/root/project/cmd.go | Updates the project command to include robot account management. |
Signed-off-by: bupd <bupdprasanth@gmail.com>
This commit adds delete and get project robot accounts cmds 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>
Collaborator
|
@bupd Would you prefer that I:
Happy to follow whichever workflow works best for you—just let me know. 🙌 |
Member
Author
|
Both create a new PR and also reference it here Thanks |
7 tasks
Member
Author
|
closing in favor of #489 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.






Fixes #100
This PR adds system robot account cmds to manage project wide robot accounts in harbor cli.
Commands to implement:
harbor project robot list-- list robot accountsharbor project robot get-- get a robot accountharbor project robot delete-- delete robot accountharbor project robot create-- create a robot accountharbor project robot refresh-- refresh the secret of robot accountharbor project robot update-- update a robot accountThis PR handles project wide robot accounts.