https://github.com/fpietka/github-labels-copy
Copy any Github project labels onto your repositories
https://github.com/fpietka/github-labels-copy
github python
Last synced: 9 months ago
JSON representation
Copy any Github project labels onto your repositories
- Host: GitHub
- URL: https://github.com/fpietka/github-labels-copy
- Owner: fpietka
- License: mit
- Created: 2016-03-14T13:03:43.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2021-12-09T22:06:52.000Z (about 4 years ago)
- Last Synced: 2024-10-04T23:47:34.422Z (over 1 year ago)
- Topics: github, python
- Language: Python
- Homepage:
- Size: 29.3 KB
- Stars: 8
- Watchers: 4
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG.rst
Awesome Lists containing this project
README
.. image:: https://landscape.io/github/fpietka/github-labels-copy/master/landscape.svg?style=flat
:target: https://landscape.io/github/fpietka/github-labels-copy/master
:alt: Code Health
.. image:: https://img.shields.io/pypi/v/githublabelscopy.svg
:target: https://pypi.python.org/pypi/githublabelscopy
:alt: Version
.. image:: https://img.shields.io/pypi/pyversions/githublabelscopy.svg
:target: https://pypi.python.org/pypi/githublabelscopy
:alt: Python versions supported
.. image:: https://img.shields.io/pypi/l/githublabelscopy.svg
:target: https://pypi.python.org/pypi/githublabelscopy
:alt: License
==================
Github Labels Copy
==================
A tool to copy labels between repositories using Github API
Here are the actions done by this tool:
- Add missing labels
- Modify color for existing labels
- Delete labels not availlable in source repository
It can be used with either login/password or API Key.
Installation
------------
You can install it using ``pip``::
$ pip install githublabelscopy
Usage
-----
To copy labels between two repositories::
$ github-labels-copy myuser/source-repo myuser/target-repo
There is also two identification modes:
* --login : using your Github username, you will be prompted for your password
* --token : provide your Github token
Alternatively you can set an environment variable called ``GITHUB_API_TOKEN``. Without any identification mode specified,
it will automatically fallback on it.
You can also dump/load labels:
* --load : load labels from a previous dump (yaml file)
* --dump : dump labels into a yaml file
Options
-------
There are 3 non exclusive modes:
* -c : creates labels which don't exist on target repository
* -r : remove labels on target repository which don't exists on source repository
* -m : modify labels which don't have the right color code on target repository
Default is full mode, which execute all those actions.