github gitlab twitter
New labels release loads Git repo info
Nov 15, 2019
1 minute read

A year ago I created and published a new CLI app to make it easier for open-source maintainers to manage GitHub labels across multiple repositories. 📝

Today, I released version 0.2.0 which adds support for loading repository information from a local Git repository. Previously, labels required users to manually supply the CLI options --owner and --repo to fetch labels from or sync to a GitHub repository.

Now, for example if you run labels from your local clone of the earth repository with the URL for the origin remote repository set to `[email protected]:hackebrot/earth.git owner will behackebrotand repo will beearth`. 🌍

With environment variables for GitHub API authentication set, you can then fetch GitHub labels and write them to a labels.TOML file with:

labels fetch

When you're done editing the labels file, you can update the remote repository with:

labels sync

Alternatively, you can sync the labels from labels.TOML to a different GitHub repository by overriding the values for the repository owner and repository name using the respective CLI options:

labels sync -o pytest-dev -r cookiecutter-pytest-plugin

Thanks to @tprasadtp, @michaeljoseph and @mfonism for contributing to the new release! You can install labels 0.2.0 for Python 3.6 and newer from PyPI with pip. 📦

Back to posts