Skip to content

Commit 80b5c9a

Browse files
committed
Update docs
1 parent 3c5b2e1 commit 80b5c9a

File tree

3 files changed

+32
-7
lines changed

3 files changed

+32
-7
lines changed

cmd/dump_repo.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
// CmdDumpRepository represents the available dump repository sub-command.
2121
var CmdDumpRepository = cli.Command{
2222
Name: "dump-repo",
23-
Usage: "Dump the repository from github/gitlab",
23+
Usage: "Dump the repository from git/github/gitea/gitlab",
2424
Description: "This is a command for dumping the repository data.",
2525
Action: runDumpRepository,
2626
Flags: []cli.Flag{
@@ -32,12 +32,12 @@ var CmdDumpRepository = cli.Command{
3232
cli.StringFlag{
3333
Name: "repo_dir, r",
3434
Value: "./data",
35-
Usage: "Repository dir path",
35+
Usage: "Repository dir path to store the data",
3636
},
3737
cli.StringFlag{
3838
Name: "clone_addr",
3939
Value: "",
40-
Usage: "The URL will be clone, currently could be a github or gitlab http/https URL",
40+
Usage: "The URL will be clone, currently could be a git/github/gitea/gitlab http/https URL",
4141
},
4242
cli.StringFlag{
4343
Name: "auth_username",

cmd/restore_repo.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,22 @@ var CmdRestoreRepository = cli.Command{
2828
cli.StringFlag{
2929
Name: "repo_dir, r",
3030
Value: "./data",
31-
Usage: "Repository dir path",
31+
Usage: "Repository dir path to restore from",
3232
},
3333
cli.StringFlag{
3434
Name: "owner_name",
3535
Value: "",
36-
Usage: "The data will be stored on a directory with owner name if not empty",
36+
Usage: "Restore destination owner name",
3737
},
3838
cli.StringFlag{
3939
Name: "repo_name",
4040
Value: "",
41-
Usage: "The data will be stored on a directory with repository name if not empty",
41+
Usage: "Restore destination repository name",
4242
},
4343
cli.StringFlag{
4444
Name: "units",
4545
Value: "",
46-
Usage: `Which items will be migrated, one or more units should be separated as comma.
46+
Usage: `Which items will be restored, one or more units should be separated as comma.
4747
wiki, issues, labels, releases, release_assets, milestones, pull_requests, comments are allowed. Empty means all units.`,
4848
},
4949
},

docs/content/doc/usage/command-line.en-us.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,3 +441,28 @@ Manage running server operations:
441441
- `--host value`, `-H value`: Mail server host (defaults to: 127.0.0.1:25)
442442
- `--send-to value`, `-s value`: Email address(es) to send to
443443
- `--subject value`, `-S value`: Subject header of sent emails
444+
445+
### dump-repo
446+
447+
Dump-repo dumps repository data from git/github/gitea/gitlab:
448+
449+
- Options:
450+
- `--git_service service` : Git service, 1 plain git, 2 github, 3 gitea, 4 gitlab
451+
- `--repo_dir dir`, `-r dir`: Repository dir path to store the data
452+
- `--clone_addr addr`: The URL will be clone, currently could be a git/github/gitea/gitlab http/https URL. i.e. https://github.com/lunny/tango.git
453+
- `--auth_username lunny`: The username to visit the clone_addr
454+
- `--auth_password <password>`: The password to visit the clone_addr
455+
- `--auth_token <token>`: The personal token to visit the clone_addr
456+
- `--owner_name lunny`: The data will be stored on a directory with owner name if not empty
457+
- `--repo_name tango`: The data will be stored on a directory with repository name if not empty
458+
- `--units <units>`: Which items will be migrated, 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.
459+
460+
### restore-repo
461+
462+
Restore-repo restore repository data from disk dir:
463+
464+
- Options:
465+
- `--repo_dir dir`, `-r dir`: Repository dir path to restore from
466+
- `--owner_name lunny`: Restore destination owner name
467+
- `--repo_name tango`: Restore destination repository name
468+
- `--units <units>`: 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.

0 commit comments

Comments
 (0)