-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
cmd: restore-repo --units is repeated #19935
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
Conversation
It is not a coma separated value. Add tests and fix the documentation.
"pull_requests", | ||
"comments", | ||
} | ||
|
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.
I think this default value is not ideal for the server code.
The default value should be 0-length slice to indicate all units (there may be more in the future).
update: if it guarantees that the units
always contains the units to be restored, the support for len(units) == 0
should be deleted to make the logic consistent.
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.
I think it's a good idea to reduce the possibility to forget the places when we support more units.
Usage: `Which items will be restored, one or more units should be separated as comma. | ||
wiki, issues, labels, releases, release_assets, milestones, pull_requests, comments are allowed. Empty means all units.`, | ||
Value: &defaultUnits, | ||
Usage: "Which items will be restored, can be repeated", |
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.
Usage: "Which items will be restored, can be repeated", | |
Usage: "Which items (wiki, issues, labels, releases, release_assets, milestones, pull_requests, comments) will be restored, can be repeated. Not providing this flag means all units.", |
Since it works, no blocker from my side. Just put my thoughts here. |
This pull request is closed as requested by the author who will not be able to answer further questions here because they do not have a GitHub account. |
It is not a coma separated value. Add tests and fix the documentation.
This PR originates from @dachary of the forgefriends project. Please see here for origin.