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 `manifest fetch` command #1295

Closed qweeah closed 2 months ago

qweeah commented 3 months ago

What this PR does / why we need it: This PR add --format flag to manifest fetch command to support field formatting for OCI manifests.

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

Please check the following list:

codecov[bot] commented 3 months ago

Codecov Report

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

Project coverage is 84.46%. Comparing base (85fbdab) to head (4ec65f9).

Files Patch % Lines
...md/oras/internal/display/content/manifest_fetch.go 85.71% 1 Missing and 1 partial :warning:
...rnal/display/metadata/descriptor/manifest_fetch.go 77.77% 1 Missing and 1 partial :warning:
...s/internal/display/metadata/json/manifest_fetch.go 75.00% 1 Missing and 1 partial :warning:
...ternal/display/metadata/template/manifest_fetch.go 77.77% 1 Missing and 1 partial :warning:
cmd/oras/internal/display/utils/utils.go 77.77% 1 Missing and 1 partial :warning:
cmd/oras/root/manifest/fetch.go 92.85% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1295 +/- ## ========================================== + Coverage 84.04% 84.46% +0.41% ========================================== Files 90 97 +7 Lines 3467 3541 +74 ========================================== + Hits 2914 2991 +77 + Misses 331 327 -4 - Partials 222 223 +1 ```

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