https://github.com/pawamoy/moving-stars
:star: Copy GitHub stars to GitLab :stars:
https://github.com/pawamoy/moving-stars
github gitlab mirror movingtogitlab star
Last synced: 6 days ago
JSON representation
:star: Copy GitHub stars to GitLab :stars:
- Host: GitHub
- URL: https://github.com/pawamoy/moving-stars
- Owner: pawamoy
- License: isc
- Created: 2018-06-07T14:11:58.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-09-08T23:04:55.000Z (over 4 years ago)
- Last Synced: 2025-05-07T18:04:25.854Z (6 days ago)
- Topics: github, gitlab, mirror, movingtogitlab, star
- Language: Python
- Homepage:
- Size: 181 KB
- Stars: 10
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Moving Stars
[](https://github.com/pawamoy/moving-stars/actions?query=workflow%3Aci)
[](https://pawamoy.github.io/moving-stars/)
[](https://pypi.org/project/moving-stars/):star: Star on GitLab.com the same repos your starred on GitHub.com! :stars:

Namespace and project name must be the same on GitHub and GitLab.
Case is insensitive though :+1:!## Requirements
Moving Stars requires Python 3.6 or above.
To install Python 3.6, I recommend using
pyenv
.```bash
# install pyenv
git clone https://github.com/pyenv/pyenv ~/.pyenv# setup pyenv (you should also put these three lines in .bashrc or similar)
export PATH="${HOME}/.pyenv/bin:${PATH}"
export PYENV_ROOT="${HOME}/.pyenv"
eval "$(pyenv init -)"# install Python 3.6
pyenv install 3.6.12# make it available globally
pyenv global system 3.6.12
```## Installation
With `pip`:
```bash
python3.6 -m pip install moving-stars
```With [`pipx`](https://github.com/pipxproject/pipx):
```bash
python3.6 -m pip install --user pipxpipx install --python python3.6 moving-stars
```## Usage
### Bash
```bash
export GITHUB_TOKEN=
export GITLAB_TOKEN=moving-stars
```### Docker
```bash
docker run -e GITHUB_TOKEN= -e GITLAB_TOKEN= --rm pawamoy/moving-stars
```### Tokens
- [Create a new GitHub token](https://github.com/settings/tokens/new) with `read:user` scope.
- [Create a new GitLab token](https://gitlab.com/profile/personal_access_tokens) with `api` scope.### Input file
A file containing the list of starred repositories that you want to copy on GitLab.
The format of the input file is very simple.```
namespace/repository
namespace2/repository2
...
```Example:
```
microsoft/ghcrawler-cli
github/VisualStudio
Pawamoy/moving-stars
this-repo/does-not-exist
cryptsetup/cryptsetup
```### Other options
```console
$ moving-stars -h
usage: moving-stars [-h] [-f FROM_FILE] [--no-pre-skip]Command line tool to copy GitHub stars to GitLab.
optional arguments:
-h, --help show this help message and exit
-f FROM_FILE, --from-file FROM_FILE
Read star list from file.
-o OUTPUT_SOURCE_LIST, --output-source-list OUTPUT_SOURCE_LIST
Output downloaded source list to file.
--no-pre-skip Don't download list from target to skip already
starred projects.
```It can be useful to first download your starred list, update it manually
(to correct unmatching namespaces / project names),
and then star on GitLab with this list:```bash
moving-stars -o star_list
# edit file manually...
moving-stars -f star_list
```