-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(cli): standardise a top level output format for all lotus CLIs #12868
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the PR title to match https://github.com/filecoin-project/lotus/blob/master/CONTRIBUTING.md#pr-title-conventions
PR title now matches the required format.
Thank you for your pull request, @shobit000! I've refined the title to ensure it meets the "PR title check" criteria. I've also assigned Masih as the reviewer for your PR. He will review it shortly and provide feedback. |
ok |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make sure the CI is green before re-requesting review.
any updates ?? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rebase your branch atop master
. The diff does't seem right.
.github/workflows/stale-branches
Outdated
@@ -0,0 +1,33 @@ | |||
# .github/workflows/stale-branches.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebase gone wrong?
I'm going to approve and run workflows so @shobit000 can see the CI state. (From a safety regard, since the PR is from a fork, this will use GitHub runners.) |
@shobit000 : when CI is passing, please go ahead and re-request review |
Related Issues
This PR addresses issue #12616 regarding the standardization of the output format for all Lotus CLIs.
Proposed Changes
The changes include:
This pull request includes several changes to the CLI commands and introduces a standardized output format for all Lotus CLI commands. The most important changes include the removal of some developer and network commands, the addition of new CLI commands for managing the chain index and miner, and the introduction of a utility function for formatting output.
Motivation
Motivation:
The --output flag facilitates programmatic use of Lotus CLI commands, supporting JSON and text formats for easier parsing and processing with tools like jq.
Changes:
cli/chain.go: Updated to support the --output flag and format the output accordingly.
cli/miner/miner.go: Updated to support the --output flag and format the output accordingly.
cli/cmd.go: Updated to support the --output flag and format the output accordingly.
cli/index.go: Updated to support the --output flag and format the output accordingly.
cli/util/output.go: New file that contains the implementation of the FormatOutput function.