appFlags returns the CLI flags for the backup command.
()
| 10 | |
| 11 | // appFlags returns the CLI flags for the backup command. |
| 12 | func appFlags() []cli.Flag { |
| 13 | return []cli.Flag{ |
| 14 | // Config file flag |
| 15 | &cli.StringFlag{ |
| 16 | Name: "config", |
| 17 | Usage: "Path to config file (default: OS config directory)", |
| 18 | }, |
| 19 | |
| 20 | // Generic flags |
| 21 | &cli.StringFlag{ |
| 22 | Name: "service", |
| 23 | Usage: "Git Hosted Service Name (github/gitlab/bitbucket/forgejo)", |
| 24 | }, |
| 25 | &cli.StringFlag{ |
| 26 | Name: "githost.url", |
| 27 | Usage: "DNS of the custom Git host", |
| 28 | }, |
| 29 | &cli.StringFlag{ |
| 30 | Name: "backupdir", |
| 31 | Usage: "Backup directory", |
| 32 | }, |
| 33 | &cli.BoolFlag{ |
| 34 | Name: "ignore-private", |
| 35 | Usage: "Ignore private repositories/projects", |
| 36 | }, |
| 37 | &cli.BoolFlag{ |
| 38 | Name: "ignore-fork", |
| 39 | Usage: "Ignore repositories which are forks", |
| 40 | }, |
| 41 | &cli.BoolFlag{ |
| 42 | Name: "use-https-clone", |
| 43 | Usage: "Use HTTPS for cloning instead of SSH", |
| 44 | }, |
| 45 | &cli.BoolFlag{ |
| 46 | Name: "bare", |
| 47 | Usage: "Clone bare repositories", |
| 48 | }, |
| 49 | |
| 50 | // GitHub specific flags |
| 51 | &cli.StringFlag{ |
| 52 | Name: "github.repoType", |
| 53 | Usage: "Repo types to backup (all, owner, member, starred)", |
| 54 | DefaultText: "all", |
| 55 | Value: "all", |
| 56 | }, |
| 57 | &cli.StringFlag{ |
| 58 | Name: "github.namespaceWhitelist", |
| 59 | Usage: "Organizations/Users from where we should clone (separate each value by a comma: 'user1,org2')", |
| 60 | }, |
| 61 | &cli.BoolFlag{ |
| 62 | Name: "github.createUserMigration", |
| 63 | Usage: "Download user data", |
| 64 | }, |
| 65 | &cli.BoolFlag{ |
| 66 | Name: "github.createUserMigrationRetry", |
| 67 | Usage: "Retry creating the GitHub user migration if we get an error", |
| 68 | DefaultText: "true", |
| 69 | Value: true, |
no outgoing calls