Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support labels add/remove on artifact #314

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Standing-Man
Copy link
Contributor

add subcommand lables to manage labels of an artifact

harbor artifact labels add -> Add a label of an artifact
harbor artifact labels remove -> Remove a label of an artifact

…generate the newly added command file

Signed-off-by: Alan Tang <[email protected]>
reference = prompt.GetReferenceFromUser(repoName, projectName)
labelID = prompt.GetLabelIdFromUser(opts)
}
err = api.AddLabel(projectName, repoName, reference, labelID)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @bupd and @Vad1mo, golangci-lint detected duplicate code in the add and remove subcommands, but since they serve different purposes, I'm wondering if there's a recommended way to handle this. Any suggestions?
image
image

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.

1 participant