oras-project / oras

OCI registry client - managing content like artifacts, images, packages
https://oras.land
Apache License 2.0
1.52k stars 181 forks source link

refactor: status, metadata and content handlers for `manifest index` commands #1509

Closed wangxiaoxuan273 closed 2 weeks ago

wangxiaoxuan273 commented 2 months ago

What this PR does / why we need it: Implements output handlers for manifest index commands.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged): Fixes #1503

Please check the following list:

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 82.52427% with 36 lines in your changes missing coverage. Please review.

Project coverage is 83.96%. Comparing base (b4be9a6) to head (2f1dd59). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
cmd/oras/root/manifest/index/update.go 61.11% 14 Missing and 7 partials :warning:
cmd/oras/root/manifest/index/create.go 50.00% 10 Missing and 5 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1509 +/- ## ========================================== - Coverage 83.99% 83.96% -0.04% ========================================== Files 118 119 +1 Lines 5174 5306 +132 ========================================== + Hits 4346 4455 +109 - Misses 588 604 +16 - Partials 240 247 +7 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

wangxiaoxuan273 commented 1 month ago

As per offline discussion, added, merged, removed, pushed, packed should exist in both status and metadata output. And Status output is needed in the PR, metadata output can be added in a future pr when needed.