A Python script to migrate or copy labels between GitHub repositories.
clone-labels
is a Python script that uses the GitHub API to copy labels from one repository to multiple other repositories. This is useful for developers who want to maintain consistent labelling across multiple projects.
- Clone the repository:
git clone https://github.com/axiomatic-aardvark/clone-labels.git
- Navigate into the cloned project directory:
cd clone-labels
- Install the required Python packages:
pip install -r requirements.txt
- Open the script
clone_labels.py
in a text editor. - Replace
GH_PAT_TOKEN
with your actual GitHub personal access token. - Replace
<username>/<source repository name>
with your username and the name of the repository from which you want to copy the labels. - Replace
target_repo_names
with the names of the repositories where you want to copy the labels to. - Save and close the file.
- Run the script:
python clone_labels.py
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.