{"id":14008214,"url":"https://github.com/gotsunami/gitlab-copy","last_synced_at":"2025-07-24T03:32:11.075Z","repository":{"id":106927989,"uuid":"47624269","full_name":"gotsunami/gitlab-copy","owner":"gotsunami","description":"Batch copy issues between GitLab instances, with some cool features","archived":true,"fork":false,"pushed_at":"2024-03-10T17:41:56.000Z","size":603,"stargazers_count":127,"open_issues_count":13,"forks_count":19,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-08-11T11:02:49.099Z","etag":null,"topics":["batch-copy","cli","gitlab"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gotsunami.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-12-08T13:36:56.000Z","updated_at":"2024-07-08T20:35:30.000Z","dependencies_parsed_at":"2024-06-20T05:45:04.471Z","dependency_job_id":"1c4db378-2647-4dfa-a875-7160fa29903c","html_url":"https://github.com/gotsunami/gitlab-copy","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotsunami%2Fgitlab-copy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotsunami%2Fgitlab-copy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotsunami%2Fgitlab-copy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotsunami%2Fgitlab-copy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gotsunami","download_url":"https://codeload.github.com/gotsunami/gitlab-copy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227410513,"owners_count":17774762,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["batch-copy","cli","gitlab"],"created_at":"2024-08-10T11:01:25.504Z","updated_at":"2024-11-30T19:30:50.793Z","avatar_url":"https://github.com/gotsunami.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"\n# GitLab Copy\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/gotsunami/gitlab-copy)](https://goreportcard.com/report/github.com/gotsunami/gitlab-copy)\n\n**PROJECT ARCHIVED**: unfortunately, due to lack of time, this repository is no longer maintained.\n\n`gitlab-copy` is a simple tool for copying issues/labels/milestones/notes from one GitLab project to another, possibly running on different GitLab instances.\n\nBy default, `gitlab-copy` won't copy anything until told **explicitly** to do so on the command line: running it will do nothing but showing some statistics.\n\n**Note**: GitLab 8.6 introduced the ability [to move an issue to another project](https://about.gitlab.com/2016/03/22/gitlab-8-6-released/), but on the same GitLab installation only. `gitlab-copy` can still prove valuable to move issues between projects on different GitLab hosts and to perform batch operations from the command line (see the feature list below).\n\n## Download\n\nInstalling `gitlab-copy` is very easy since it comes as a static binary with no dependencies. Just [grab a compiled version](https://github.com/gotsunami/gitlab-copy/releases/latest) for your system (or have a look at the **Compile From Source** section).\n\n## Features\n\nThe following features are available:\n\n- Support for GitLab instances with self-signed TLS certificates by using the `-k` CLI flag (since `v0.8.0`)\n- Support for different GitLab hosts/instances (since `v0.8.0`)\n- Copy milestones if not existing on target (use `milestonesOnly` to copy milestones only, see below)\n- Copy all source labels on target (use `labelsOnly` to copy labels only, see below)\n- Copy issues if not existing on target (by title)\n- Apply closed status on issues, if any\n- Set issue's assignee (if user exists) and milestone, if any\n- Copy notes (attached to issues), preserving user ownership\n- Can specify in the config file a specific issue or range of issues to copy\n- Auto-close source issues after copy\n- Add a note with a link to the new issue created in the target project\n- Use a custom link text template, like \"Closed in favor or me/myotherproject#12\"\n\n## Getting Started\n\nHere are some instructions to get started. First make sure you have valid GitLab account tokens for both source and destination GitLab installations. They are used to access GitLab resources without authentication. GitLab private tokens are availble in \"*Profile Settings* -\u003e *Account*\".\n\nNow, write a `gitlab.yml` YAML config file to specify source and target projects, along with your GitLab account tokens:\n\n```yaml\nfrom:\n  url: https://gitlab.mydomain.com\n  token: atoken\n  project: namespace/project\nto:\n  url: https://gitlab.myotherdomain.com\n  token: anothertoken\n  project: namespace/project\n```\n\nThat's it. You may want to run the program now. See the section below.\n\n## Run it!\n\nNow grab some project stats by running\n```\n$ ./gitlab-copy gitlab.yml\n```\n\nIf everything looks good, run the same command, this time with the `-y` flag to effectively copie issues between GitLab\ninstances (they can be the same):\n```\n$ ./gitlab-copy -y gitlab.yml\n```\n\nIf one of the GitLab instances uses a self-signed TLS certificate, use the `-k` flag (available in `v0.8.0`) to skip the TLS verification process:\n\n```\n$ ./gitlab-copy -k -y gitlab.yml\n```\n\n## More Features\n\nNote that a specific issue or ranges of issues can be specified in the YAML config file. If you want to\ncopy only issue #15 and issues #20 to #30, add an `issues` key in the `from:` key:\n\n```yaml\nfrom:\n  url: https://gitlab.mydomain.com\n  token: atoken\n  project: namespace/project\n  issues:\n  - 15\n  - 20-30\n...\n```\n\nIn order to copy all labels from one project to another (labels only, not issues), just append a `labelsOnly`\nentry in the `from` section:\n\n```yaml\nfrom:\n  url: https://gitlab.mydomain.com\n  token: atoken\n  project: namespace/project\n  labelsOnly: true\nto:\n  url: https://gitlab.sameorotherdomain.com\n  token: anothertoken\n  project: namespace/otherproject\n...\n```\n\nIn order to copy all milestones only, just add a `milestonesOnly` entry in the `from` section:\n```yaml\nfrom:\n  url: https://gitlab.mydomain.com\n  token: atoken\n  project: namespace/project\n  milestonesOnly: true\n...\n```\n\nNotes in issues can preserve original user ownership when copied. To do that, you need\nto\n\n- have tokens for all users involved\n- add related users as members of the target project beforehand (with at least a *Reporter* permission)\n- add a `users` entry into the `to` target section:\n\n```yaml\n...\nto:\n  url: https://gitlab.sameorotherdomain.com\n  token: anothertoken\n  project: namespace/otherproject\n  users:\n    bob: anothertoken\n    alice: herowntoken\n```\n\n## Compile From Source\n\nEnsure you have a working [Go](https://www.golang.org) 1.18+ installation then:\n```\n$ go install github.com/gotsunami/gitlab-copy/cmd/gitlab-copy@latest\n```\n\n- The program gets compiled into `bin/gitlab-copy`\n- Cross-compile with `make buildall`\n- Prepare distribution packages with `make dist`\n\n## Donate\n\nIf you like this tool and want to support its development, a donation would be greatly appreciated!\n\nIt's not about the amount at all: making a donation boosts the motivation to work on a project. Thank you very much if you can give anything.\n\nMonero address: `88uoutKJS2w3FfkKyJFsNwKPHzaHfTAo6LyTmHSAoQHgCkCeR8FUG4hZ8oD4fnt8iP7i1Ty72V6CLMHi1yUzLCZKHU1pB7c`\n\n![My monero address](qr-donate.png)\n\n## License\n\nMIT. See `LICENSE` file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgotsunami%2Fgitlab-copy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgotsunami%2Fgitlab-copy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgotsunami%2Fgitlab-copy/lists"}