-
Notifications
You must be signed in to change notification settings - Fork 71
Continuing Work from #367 #444
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
Open
rizul2108
wants to merge
7
commits into
goharbor:main
Choose a base branch
from
rizul2108:bug-clean
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
Signed-off-by: Rohan <[email protected]>
Signed-off-by: Rohan <[email protected]>
Signed-off-by: Rizul Gupta <[email protected]>
Signed-off-by: Rizul Gupta <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR resolves issues with artifact reference parsing by allowing repository names with embedded slashes and improves the Harbor CLI documentation and UI for artifact commands.
- Fixes the parsing logic for artifact references by using ":" and "@" delimiters.
- Updates CLI documentation (e.g., weight adjustments, command examples, and new flag options) for improved clarity and usability.
- Enhances the artifact view command with an additional empty-reference check.
Reviewed Changes
Copilot reviewed 21 out of 28 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
doc/cli-docs/harbor-artifact.md | Updated weight and configuration flag; revised description to reflect new parsing logic. |
doc/cli-docs/harbor-artifact-view.md | Updated weight and example syntax to show new reference formats. |
doc/cli-docs/harbor-artifact-tags*.md | Adjusted weight and config paths across multiple tags documentation files. |
doc/cli-docs/harbor-artifact-scan*.md | Updated weight and config paths for scan and scan-stop/start commands. |
doc/cli-docs/harbor-artifact-list.md | Revised description, weight, and added new optional flags for pagination and sorting. |
doc/cli-docs/harbor-artifact-delete.md | Updated configuration flag. |
cmd/harbor/root/artifact/view.go | Updated example text and added error handling for empty artifact references. |
cmd/harbor/root/artifact/list.go | Enhanced command description with additional usage details. |
Files not reviewed (7)
- doc/man-docs/man1/harbor-artifact-delete.1: Language not supported
- doc/man-docs/man1/harbor-artifact-list.1: Language not supported
- doc/man-docs/man1/harbor-artifact-scan-start.1: Language not supported
- doc/man-docs/man1/harbor-artifact-scan-stop.1: Language not supported
- doc/man-docs/man1/harbor-artifact-scan.1: Language not supported
- doc/man-docs/man1/harbor-artifact-tags-create.1: Language not supported
- doc/man-docs/man1/harbor-artifact-tags-delete.1: Language not supported
Co-authored-by: Copilot <[email protected]> Signed-off-by: Rizul Gupta <[email protected]>
bupd
approved these changes
Apr 25, 2025
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.
Fix #365
Fix #366
Issue
The artifact reference parsing logic incorrectly assumed that splitting the input by
/
would always yield exactly three parts —project/repository/reference
. However, some repositories legitimately contain/
in their names, which broke valid inputs.For example:
was being parsed incorrectly due to the problematic assumption.
Solution
:
and@
as delimiters for the tag or digest (reference
) portion of the artifact./
without misinterpretation safely.UI Improvement
Additionally, improved the
artifact list
view: