From f1cad9dbb138e8ca343150e3f803fba19078ab29 Mon Sep 17 00:00:00 2001 From: simongregorebner Date: Mon, 23 Dec 2024 18:40:45 +0000 Subject: [PATCH] Expose --labels option - Fixes #698 (#699) Expose the --labels option for the `tea repos migrate` command. This pull request fixes the issue reported in gitea/tea#698 ```bash > tea ( main ) % ./tea repos migrate --help NAME: tea repos migrate - Migrate a repository USAGE: tea repos migrate [command options] DESCRIPTION: Migrate a repository and or mirror it. OPTIONS: --name value Name of the repository --owner value Owner of the repository --clone-url value Clone URL of the repository --service value Service to migrate from. Supported services are: git, gitea, gitlab, gogs --mirror Mirror the repository (default: false) --private Make the repository private (default: false) --template Make the repository a template (default: false) --wiki Copy the wiki (default: false) --issues Copy the issues (default: false) --labels Copy the lables (default: false) --pull-requests Copy the pull requests (default: false) --releases Copy the releases (default: false) --milestones Copy the milestones (default: false) --mirror-interval value Interval to mirror the repository. --lfs Copy the LFS objects (default: false) --lfs-endpoint value LFS endpoint to use --auth-user value Username to use for authentication. --auth-password value Password to use for authentication. --auth-token value Token to use for authentication. --login value, -l value Use a different Gitea Login. Optional --output value, -o value Output format. (simple, table, csv, tsv, yaml, json) --help, -h show help ``` Fix tested successfully on an own migration from gitlab to gitea This PR closes gitea/tea#698 Co-authored-by: ebner Reviewed-on: https://gitea.com/gitea/tea/pulls/699 Reviewed-by: Lunny Xiao Co-authored-by: simongregorebner Co-committed-by: simongregorebner --- cmd/repos/migrate.go | 4 ++++ docs/CLI.md | 2 ++ 2 files changed, 6 insertions(+) diff --git a/cmd/repos/migrate.go b/cmd/repos/migrate.go index d2c0bec..93d1bbd 100644 --- a/cmd/repos/migrate.go +++ b/cmd/repos/migrate.go @@ -64,6 +64,10 @@ var CmdRepoMigrate = cli.Command{ Name: "issues", Usage: "Copy the issues", }, + &cli.BoolFlag{ + Name: "labels", + Usage: "Copy the lables", + }, &cli.BoolFlag{ Name: "pull-requests", Usage: "Copy the pull requests", diff --git a/docs/CLI.md b/docs/CLI.md index 65583d7..c0c4251 100644 --- a/docs/CLI.md +++ b/docs/CLI.md @@ -1145,6 +1145,8 @@ Migrate a repository **--issues**: Copy the issues +**--labels**: Copy the lables + **--lfs**: Copy the LFS objects **--lfs-endpoint**="": LFS endpoint to use