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: make --identity-token an alias of --password #1294

Closed wangxiaoxuan273 closed 2 months ago

wangxiaoxuan273 commented 3 months ago

What this PR does / why we need it:

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

Please check the following list:

wangxiaoxuan273 commented 3 months ago

Current display: image issue image

codecov[bot] commented 3 months ago

Codecov Report

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

Project coverage is 84.49%. Comparing base (bb3443d) to head (46bfbe3).

Files Patch % Lines
cmd/oras/internal/option/remote.go 89.74% 3 Missing and 1 partial :warning:
cmd/oras/root/login.go 42.85% 0 Missing and 4 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1294 +/- ## ========================================== + Coverage 84.40% 84.49% +0.08% ========================================== Files 101 101 Lines 3617 3637 +20 ========================================== + Hits 3053 3073 +20 Misses 335 335 Partials 229 229 ```

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

qweeah commented 3 months ago

-u xxx --identity-token xxx usage should be banned, see https://github.com/oras-project/oras/issues/742#issuecomment-1398076477 <= just find this has already been resolved, good catch.

TerryHowe commented 3 months ago

Closes: https://github.com/oras-project/oras/pull/1040

shizhMSFT commented 3 months ago

LGTM, created #1301 as a follow up so we can make the flag confliction check easier.

Can we resolve #1301 first and then this PR since it really simplifies the code a lot?