-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
add list project arifacts API #20803
Conversation
This API supports listing all artifacts belonging to a specified project. It also allows fetching the latest artifact in each repositry, with the option to filter by either media_type or artifact_type. Signed-off-by: wang yan <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #20803 +/- ##
===========================================
+ Coverage 45.36% 66.28% +20.91%
===========================================
Files 244 1045 +801
Lines 13333 113988 +100655
Branches 2719 2845 +126
===========================================
+ Hits 6049 75557 +69508
- Misses 6983 34311 +27328
- Partials 301 4120 +3819
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
lgtm
Signed-off-by: wang yan <[email protected]>
482eb9c
to
7c3906c
Compare
@@ -501,11 +501,12 @@ func (a *artifactAPI) RequireLabelInProject(ctx context.Context, projectID, labe | |||
return nil | |||
} | |||
|
|||
func option(withTag, withImmutableStatus, withLabel, withAccessory *bool) *artifact.Option { | |||
func option(withTag, withImmutableStatus, withLabel, withAccessory *bool, latestInRepository *bool) *artifact.Option { |
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.
It is better to refactor the current option like this
https://github.com/goharbor/harbor/blob/e92674a42ad7461e085db00893f6e16e8cc8d080/src/lib/cache/options.go
* add list project arifacts API This API supports listing all artifacts belonging to a specified project. It also allows fetching the latest artifact in each repositry, with the option to filter by either media_type or artifact_type. Signed-off-by: wang yan <[email protected]> * resolve the comments Signed-off-by: wang yan <[email protected]> --------- Signed-off-by: wang yan <[email protected]> Signed-off-by: kunal-511 <[email protected]>
This API supports listing all artifacts belonging to a specified project. It also allows fetching the latest artifact in each repositry, with the option to filter by either media_type or artifact_type.
Thank you for contributing to Harbor!
Comprehensive Summary of your change
Issue being fixed
Fixes #20756
Please indicate you've done the following: