forked from forgejo/forgejo
Fix cli command restore-repo: "units" should be parsed as StringSlice (#19953)
* Fix cli command restore-repo: "units" should be parsed as StringSlice because after #15790 it's read by c.StringSlice("units"). Before, the "units" were processed by strings.Split * Add checking for invalid unit names Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
parent
97548d2722
commit
9f87b60b46
2 changed files with 13 additions and 5 deletions
|
@ -37,10 +37,10 @@ var CmdRestoreRepository = cli.Command{
|
|||
Value: "",
|
||||
Usage: "Restore destination repository name",
|
||||
},
|
||||
cli.StringFlag{
|
||||
cli.StringSliceFlag{
|
||||
Name: "units",
|
||||
Value: "",
|
||||
Usage: `Which items will be restored, one or more units should be separated as comma.
|
||||
Value: nil,
|
||||
Usage: `Which items will be restored, one or more units should be repeated with this flag.
|
||||
wiki, issues, labels, releases, release_assets, milestones, pull_requests, comments are allowed. Empty means all units.`,
|
||||
},
|
||||
cli.BoolFlag{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue