oras-project / oras

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

feat: support `--format` in `oras discover` #1299

Closed qweeah closed 2 months ago

qweeah commented 3 months ago

What this PR does / why we need it: This PR 1) Added a new --format flag following spec #1199 2) Changes tree as default output of oras discover

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 #638

Please check the following list:

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 83.89262% with 24 lines in your changes are missing coverage. Please review.

Project coverage is 84.34%. Comparing base (b5217ef) to head (46fd349).

Files Patch % Lines
...d/oras/internal/display/metadata/table/discover.go 78.94% 4 Missing and 4 partials :warning:
cmd/oras/root/discover.go 74.19% 3 Missing and 5 partials :warning:
...md/oras/internal/display/metadata/tree/discover.go 85.18% 2 Missing and 2 partials :warning:
...md/oras/internal/display/metadata/json/discover.go 85.71% 1 Missing and 1 partial :warning:
...ras/internal/display/metadata/template/discover.go 86.66% 1 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1299 +/- ## ========================================== - Coverage 84.40% 84.34% -0.07% ========================================== Files 97 101 +4 Lines 3540 3615 +75 ========================================== + Hits 2988 3049 +61 - Misses 329 337 +8 - Partials 223 229 +6 ```

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