Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/displague/github-labeller
Label all of your repositories within an organization with labels defined in labels.json
https://github.com/displague/github-labeller
Last synced: 2 months ago
JSON representation
Label all of your repositories within an organization with labels defined in labels.json
- Host: GitHub
- URL: https://github.com/displague/github-labeller
- Owner: displague
- License: apache-2.0
- Created: 2020-07-31T22:35:17.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-08-26T13:54:09.000Z (over 4 years ago)
- Last Synced: 2024-10-04T16:52:43.109Z (3 months ago)
- Language: Go
- Size: 8.79 KB
- Stars: 11
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GitHub Repo Labeller
Label all of your repositories within an organization with labels defined in
`labels.json` from the current directory.This is a small tool to consistently label **all** repositories in a Github org
with the specified labels. This takes advantage of the [go-github
library](https://github.com/google/go-github).While [Github labels can be set at the organization
level](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/managing-default-labels-for-repositories-in-your-organization),
existing repositories are not updated to reflect those labels.## Install
```sh
GO111MODULE=off go get github.com/displague/github-labeller
```## Usage
**First**, make sure `labels.json` exists and has all of the labels you want to
add to your repositories.If `repos` is not present in the file, the labels provided will be added to all
repositories in the organization.```json
{
"repos": ["foo", "bar"],
"labels": [{"name":"labelA", "color": "b0b0b0", "description": "Label A"}]
}
```Then run `github-labeller` with a `GITHUB_TOKEN` set in the environment:
```console
GITHUB_TOKEN=... github-labeller ORG
```## TODO
* [ ] Add the labels to the Org (if permitted)?
* [ ] Update existing labels?