{"id":18581884,"url":"https://github.com/coder/ghlabels","last_synced_at":"2025-04-10T11:35:34.861Z","repository":{"id":47402482,"uuid":"223852326","full_name":"coder/ghlabels","owner":"coder","description":"A tool to synchronize labels on GitHub repositories sanely.","archived":false,"fork":false,"pushed_at":"2020-01-23T16:20:30.000Z","size":40,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-02T22:35:28.709Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-25T03:19:33.000Z","updated_at":"2025-03-03T05:40:54.000Z","dependencies_parsed_at":"2022-08-31T12:41:47.211Z","dependency_job_id":null,"html_url":"https://github.com/coder/ghlabels","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coder%2Fghlabels","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coder%2Fghlabels/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coder%2Fghlabels/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coder%2Fghlabels/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coder","download_url":"https://codeload.github.com/coder/ghlabels/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248208688,"owners_count":21065205,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-07T00:08:03.864Z","updated_at":"2025-04-10T11:35:29.847Z","avatar_url":"https://github.com/coder.png","language":"Go","readme":"# ghlabels\n\nA tool to synchronize labels on GitHub repositories sanely.\n\nIt uses the same credentials as [hub](http://github.com/github/hub) to access github repositories. In fact, it uses the same library\nas hub so if you have multiple credentials with hub and expect to be able to select between them,\nghlabels will offer the same prompts. If you do not have hub setup, it will prompt for the credentials\nthe same way hub does. You will need to set `$GITHUB_HOST` before running a command for the first time\nif you are using a custom GitHub enterprise setup and have not used it already with hub. After that,\nghlabels will prompt you to select between hosts.\n\n## Install\n\n```\ngo get -u go.coder.com/ghlabels\n```\n\n## Usage\n\nghlabels uses a JSON file that looks like this and represents the labels for a given repository:\n\n```json\n[\n    {\n        \"name\": \"blocked\",\n        \"description\": \"\",\n        \"color\": \"032e70\"\n    },\n    {\n        \"name\": \"good first issue\",\n        \"description\": \"\",\n        \"color\": \"e7dff5\"\n    },\n    {\n        \"name\": \"p1\",\n        \"description\": \"\",\n        \"color\": \"df0000\"\n    },\n    {\n        \"name\": \"p2\",\n        \"description\": \"\",\n        \"color\": \"ff7474\"\n    },\n    {\n        \"name\": \"p3\",\n        \"description\": \"\",\n        \"color\": \"ffabab\"\n    },\n    {\n        \"name\": \"p4\",\n        \"description\": \"\",\n        \"color\": \"ffe3e3\"\n    }\n]\n``` \n\nYou may create and edit a file manually or have ghlabels create this file for you via\n\n```\nghlabels pull \u003corg\u003e/\u003crepo\u003e \u003e labels.json\n```\n\nThe above command will create a `labels.json` file in the current directory for the labels on `\u003corg\u003e/\u003crepo\u003e`\n\nYou can push this to an entire organization's repos (or a single repo) via\n\n```\nghlabels push \u003corg\u003e[/\u003crepo\u003e] \u003c labels.json \n```\n\nIts important to note that this will not delete labels not included in the labels.json. This is to allow\nindividual repos to create their own custom labels.\n\nYou can delete labels across entire organizations or repos via the `delete` subcommand.\n\n```\nghlabels delete \u003corg\u003e[\u003crepo\u003e] [\u003clabel\u003e]\n```\n\nIf you do not provide a label, all the labels of the organization will be deleted.\n\nYou can rename labels across entire organizations or repos via the `rename` subcommand.\n\n```\nghlabels rename \u003cowner\u003e[/\u003crepo\u003e] \u003cold_name\u003e \u003cnew_name\u003e\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoder%2Fghlabels","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoder%2Fghlabels","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoder%2Fghlabels/lists"}