Skip to content

Conversation

RohanMishra315
Copy link
Contributor

  1. Changing to explicitly states where the manifest index will be created.
  2. Keeping all positional arguments first improves readability and reduces the risk of users mistaking flags like --oci-layout as having their own positional arguments.

Fixes: #1638

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 #

Please check the following list:

  • Does the affected code have corresponding tests, e.g. unit test, E2E test?
  • Does this change require a documentation update?
  • Does this introduce breaking changes that would require an announcement or bumping the major version?
  • Do all new files have an appropriate license header?

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Overview

This PR updates the command usage for creating a manifest index to improve clarity on where the index is created and to ensure that positional arguments are ordered before flags.

  • Updated the "Use" string in create.go to replace with and include
  • Revised examples to reflect the new positional argument order and flag placement

Reviewed Changes

File Description
cmd/oras/root/manifest/index/create.go Updates usage string and examples for better clarity and command consistency

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

cmd/oras/root/manifest/index/create.go:59

  • [nitpick] Consider clarifying the separation between and in the usage string (e.g. by adding a delimiter) to enhance comprehension of the required positional arguments.
Use:   "create [flags] <target>[:<tag[,<tag>][...]] <sources>[{<tag>|<digest>}...]"

Copy link

codecov bot commented Mar 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.74%. Comparing base (e5cf186) to head (c123dcb).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1650      +/-   ##
==========================================
- Coverage   84.77%   84.74%   -0.04%     
==========================================
  Files         126      126              
  Lines        5683     5683              
==========================================
- Hits         4818     4816       -2     
- Misses        615      617       +2     
  Partials      250      250              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Wwwsylvia Wwwsylvia changed the title Update create.go docs: update the help doc for oras manifest index create Mar 11, 2025
Copy link
Contributor

@wangxiaoxuan273 wangxiaoxuan273 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work! Thanks for the contribution! LGTM

@Wwwsylvia
Copy link
Member

Let's merge this PR first and finish the remaining part in a separate PR.

Copy link
Member

@Wwwsylvia Wwwsylvia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but we will need another PR for oras manifest index update

1.   Changing <name> to <target> explicitly states where the manifest index will be created.
2.   Keeping all positional arguments first improves readability and reduces the risk of users mistaking flags like --oci-layout as having their own positional arguments.

Fixes: oras-project#1638


Signed-off-by: Rohan Mishra <315scisyb2020rohanmishra@gmail.com>
@Wwwsylvia Wwwsylvia merged commit c257dee into oras-project:main Apr 14, 2025
8 checks passed
FeynmanZhou pushed a commit to FeynmanZhou/oras that referenced this pull request May 28, 2025
…ect#1650)

Signed-off-by: Rohan Mishra <315scisyb2020rohanmishra@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve the help doc for oras manifest index sub commands
4 participants