{"id":19320417,"url":"https://github.com/buggaarde/labels","last_synced_at":"2026-04-30T16:34:14.857Z","repository":{"id":229957101,"uuid":"209258753","full_name":"buggaarde/labels","owner":"buggaarde","description":"Automatically create labels for your GitHub projects","archived":false,"fork":false,"pushed_at":"2019-09-19T05:28:38.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-20T22:53:32.071Z","etag":null,"topics":["click","github","github-api","github-issues","matplotlib","python","python3","python36","requests"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/buggaarde.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-09-18T08:33:31.000Z","updated_at":"2019-09-24T12:48:52.000Z","dependencies_parsed_at":"2024-03-27T04:57:53.299Z","dependency_job_id":"97dffc65-df2b-47ad-a27a-abb1169e2920","html_url":"https://github.com/buggaarde/labels","commit_stats":null,"previous_names":["buggaarde/labels"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/buggaarde/labels","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buggaarde%2Flabels","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buggaarde%2Flabels/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buggaarde%2Flabels/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buggaarde%2Flabels/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/buggaarde","download_url":"https://codeload.github.com/buggaarde/labels/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buggaarde%2Flabels/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32470879,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["click","github","github-api","github-issues","matplotlib","python","python3","python36","requests"],"created_at":"2024-11-10T01:28:49.652Z","updated_at":"2026-04-30T16:34:14.842Z","avatar_url":"https://github.com/buggaarde.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# labels\n\nAutomate label creation on your GitHub projects.\n\nEither specify the labels you want created directly, or read from json-file. Reading from json will ignore all other options and only use what is read from file.\n\n## Usage\n\n``` bash\nlabels labels_or_json --repo \"owner/repository\" [flags] [options]\n```\n\nIn order for `labels` to be a valid executable, make sure to move `labels.py` to `/usr/local/bin/labels` after making it executable. I.e.\n\n``` bash\nsudo chmod +x ./labels.py\n\nsudo cp ./labels.py /usr/local/bin/labels\n```\n\n## Overview\n\n`labels_or_json` is either a list of labels you want created, or a file containing json specifying the labels. If you want to read json from file, set the `--is_json`/`-j` flag.\n\n`--repo`/`-r` specifies the repository in which you wish to create/update labels.\n\n### Flags\n\n`--is_json`/`-j` flags whether or not the `labels_or_json` is a list of labels or a file specifying the labels. See [the example](#creating-labels-from-json) or [the GitHub API](https://developer.github.com/v3/issues/labels/#create-a-label) for the expected json-data.\n\n`--update`/`-u` flags whether existing labels should be skipped or updated with new information.\n\n### Options\n\n`--color`/`-c` specifies the color of the labels. Can either be a hex value or any [named color in the CSS4-standard](https://www.w3.org/TR/css-color-4/#named-colors). Defaults to `#FFFAFA`.\n\n`--prefix`/`-p` prefixes each label from the `labels_or_json` argument.\n\n`--suffix`/`-s` suffixes each label from the `labels_or_json` argument.\n\n`--description`/`-d` is the description of each label. In order facilitate dynamic creation of descriptions based on the label name, four special forms can be used: `{}`, `{p}`, `{s}`  and `{ps}`. They resolve to the label name, prefixed label name, suffixed label name and both pre- and suffixed label name, respectively.\n\n`--token`/`-t` sets the name of the environment variable which contains the GitHub authorization token. Defaults to `MY_GITHUB_TOKEN`.\n\n## Requirements\nRequires python 3.6+ and `requests`, `click` and `matplotlib`.\n\n## Examples\n\n### Manual specification of labels\n\n``` bash\nlabels 0 1 2 3 5 8 --update -r \"my/repository\" -c \"hotpink\" -p \"f\" -d \"{} {p} {s} {ps}\"\n```\nThe above will create the labels `f0 f1 f2 f3 f5` and `f8` in the repository `my/repository`. If any labels already exist, they will be updated to be equal to the new information. All labels will be colored hotpink and have the description `n fn n fn` -- where `n` is the label name -- since `f` is the prefix, and there is no suffix. Finally, the labels will be created with the authorization token behind the environment variable `MY_GITHUB_TOKEN`.\n\n### Creating labels from json\n\nIf we have the file `labels.json`:\n``` json\n{\n\t\"labels\": [\n\t\t{\n\t\t\t\"name\": \"label1\",\n\t\t\t\"color\": \"ff0000\",\n\t\t\t\"description\": \"a red label\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"label2\",\n\t\t\t\"color\": \"00ff00\",\n\t\t\t\"description\": \"a green label\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"label3\",\n\t\t\t\"color\": \"0000ff\",\n\t\t\t\"description\": \"a blue label\"\n\t\t}\n\t]\n}\n```\n\nThe command\n``` bash\nlabels labels.json --is_json -r \"my/repository\" -t \"GITHUB_TOKEN\" -p \"dont use\"\n```\nwill read the three labels from `labels.json` and create them in \"my/repository\" accordingly. The creation is authorized by the token behind the environment variable `GITHUB_TOKEN`. Since `--update` is not flagged, if any of the three labels already exist they will be skipped. Finally, since `--is_json` is flagged the prefix option is ignored.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuggaarde%2Flabels","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbuggaarde%2Flabels","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuggaarde%2Flabels/lists"}