{"id":18085069,"url":"https://github.com/jwodder/labelmaker","last_synced_at":"2025-07-27T20:07:09.608Z","repository":{"id":201225702,"uuid":"707254797","full_name":"jwodder/labelmaker","owner":"jwodder","description":"Create \u0026 enforce sets of labels in GitHub repositories","archived":false,"fork":false,"pushed_at":"2025-07-21T05:04:58.000Z","size":467,"stargazers_count":4,"open_issues_count":17,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-21T07:07:02.611Z","etag":null,"topics":["available-on-crates-io","github","github-labels","github-repository-management","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/jwodder.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-10-19T14:23:09.000Z","updated_at":"2025-07-21T05:05:02.000Z","dependencies_parsed_at":"2024-02-10T19:26:03.690Z","dependency_job_id":"54de7bee-2723-444f-9505-5737028b6b14","html_url":"https://github.com/jwodder/labelmaker","commit_stats":null,"previous_names":["jwodder/labelmaker"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/jwodder/labelmaker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwodder%2Flabelmaker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwodder%2Flabelmaker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwodder%2Flabelmaker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwodder%2Flabelmaker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jwodder","download_url":"https://codeload.github.com/jwodder/labelmaker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwodder%2Flabelmaker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267417664,"owners_count":24083839,"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","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["available-on-crates-io","github","github-labels","github-repository-management","rust"],"created_at":"2024-10-31T15:09:16.418Z","updated_at":"2025-07-27T20:07:09.600Z","avatar_url":"https://github.com/jwodder.png","language":"Rust","readme":"[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)\n[![CI Status](https://github.com/jwodder/labelmaker/actions/workflows/test.yml/badge.svg)](https://github.com/jwodder/labelmaker/actions/workflows/test.yml)\n[![codecov.io](https://codecov.io/gh/jwodder/labelmaker/branch/master/graph/badge.svg)](https://codecov.io/gh/jwodder/labelmaker)\n[![Minimum Supported Rust Version](https://img.shields.io/badge/MSRV-1.82-orange)](https://www.rust-lang.org)\n[![MIT License](https://img.shields.io/github/license/jwodder/labelmaker.svg)](https://opensource.org/licenses/MIT)\n\n[GitHub](https://github.com/jwodder/labelmaker) | [crates.io](https://crates.io/crates/labelmaker) | [Issues](https://github.com/jwodder/labelmaker/issues) | [Changelog](https://github.com/jwodder/labelmaker/blob/master/CHANGELOG.md)\n\n`labelmaker` is a Rust program for batch creation of [labels][] in GitHub\nrepositories, including updating and/or renaming existing labels to meet your\nspecifications.  Simply describe your desired labels in a configuration file\nand point `labelmaker` in the direction of your repositories.\n\n[labels]: https://docs.github.com/en/issues/using-labels-and-milestones-to-track-work/managing-labels\n\nInstallation\n============\n\nIn order to install `labelmaker`, you first need to have [Rust and Cargo\ninstalled](https://www.rust-lang.org/tools/install).  You can then build the\nlatest release of `labelmaker` and install it in `~/.cargo/bin` by running:\n\n    cargo install labelmaker\n\nUsage\n=====\n\n\n    labelmaker [\u003cglobal options\u003e] \u003csubcommand\u003e ...\n\nThe `labelmaker` command has the following subcommands, each detailed below:\n\n- `apply` — Apply a set of label specifications to one or more GitHub\n  repositories\n\n- `fetch` — Dump a repository's labels as a configuration file\n\n- `make` — Create or update a single label\n\nEach subcommand takes an argument or option for indicating what GitHub\nrepositories to operate on.  A repository can be specified in the form\n`OWNER/NAME` (or, when `OWNER` is the authenticated user, just `NAME`) or as a\nGitHub repository URL.  If no repository is supplied, then the current\ndirectory must belong to a Git repository whose `origin` remote points to a\nGitHub repository; `labelmaker` will operate on this remote repository.\n\nGlobal Options\n--------------\n\n- `-l \u003clevel\u003e`, `--log-level \u003clevel\u003e` — Set the log level to the given value.\n  Possible values are \"`OFF`\", \"`ERROR`\", \"`WARN`\", \"`INFO`\", \"`DEBUG`\", and\n  \"`TRACE`\" (all case-insensitive).  [default value: `INFO`]\n\n\nAuthentication\n--------------\n\n`labelmaker` requires a GitHub access token with appropriate permissions in\norder to run.  Specify the token via the `GH_TOKEN` or `GITHUB_TOKEN`\nenvironment variable or store it with the [`gh`](https://github.com/cli/cli)\ncommand.\n\nNote that, if `gh` has stored the token in a system keyring, you may be\nprompted to unlock the keyring.\n\n\n`labelmaker apply`\n------------------\n\n    labelmaker [\u003cglobal options\u003e] apply [\u003coptions\u003e] \u003cconfig-file\u003e [\u003crepository\u003e ...]\n\n`labelmaker apply` takes a path to a configuration file (See \"[Configuration\nFile](#configuration-file)\" below) and a list of GitHub repositories as\narguments.  It then creates and/or updates the labels of each repository based\non the specification in the configuration file.\n\nFor each repository, all changes are calculated before modifying anything, so\nif an error occurs based on the state of the configuration file and/or current\nrepository labels, it will be caught before any changes to the repository are\nmade.\n\n### Options\n\n- `--dry-run` — Do not change anything in GitHub, but do emit log messages\n  showing what would be changed.\n\n- `-F FILE`/`--repo-file FILE` — Also operate on all repositories listed in the\n  given file (or listed on standard input if `FILE` is `-`).  Repositories must\n  be listed one per line.  Leading \u0026 trailing whitespace is ignored.  Blank\n  lines and lines starting with `#` are skipped.\n\n- `-P NAME`/`--profile NAME` — Specify which profile in the configuration file\n  to use.  Defaults to the value of `defaults.profile` in the configuration\n  file, or to `default`.\n\n\n`labelmaker fetch`\n------------------\n\n    labelmaker [\u003cglobal options\u003e] fetch [\u003coptions\u003e] [\u003crepository\u003e]\n\n`labelmaker fetch` fetches the labels currently defined for the given GitHub\nrepository and dumps them as a `labelmaker` configuration file, ready for input\ninto `labelmaker apply`.\n\nThe generated configuration file lists only label names, colors, and\ndescriptions, no defaults, aside from the file-wide `color` setting having its\ndefault value included for use as a reference.\n\n### Options\n\n- `-o FILE`/`--outfile FILE` — Output the configuration to the given file.  By\n  default, output is written to standard output, which can also be selected by\n  supplying `-` as the outfile name.\n\n  The format (JSON, JSON5, TOML, or YAML) of the output is determined based on\n  the file's extension.  When outputting to standard output, JSON is produced.\n\n- `-P NAME`/`--profile NAME` — Set the name of the profile to place the labels\n  under in the generated configuration file.  The configuration file's default\n  profile will also be set to this value.  [default: `default`]\n\n\n`labelmaker make`\n-----------------\n\n    labelmaker [\u003cglobal options\u003e] make [\u003coptions\u003e] \u003clabel-name\u003e\n\n`labelmaker make` creates or updates the label with the given name in a GitHub\nrepository, the same as if `labelmaker apply` had been run on that repository\nwith a configuration profile containing a single label entry.\n\n### Options\n\n- `-c COLOR`/`--color COLOR` — Specify the label's color.  Colors are specified\n  using the same formats as in the configuration file.\n\n  This option can be specified multiple times, in which case one of the given\n  colors will be picked at random when creating the label, and no change will\n  be made to the label color when updating the label.\n\n  The color defaults to a random selection from the same built-in list as used\n  by the configuration file and `apply`.\n\n- `--create`/`--no-create` — Whether to create the label if it doesn't already\n  exist [default: `--create`]\n\n- `-d TEXT`, `--description TEXT` — Specify the label's description.\n\n- `--dry-run` — Do not change anything in GitHub, but do emit log messages\n  showing what would be changed.\n\n- `--enforce-case`/`--no-enforce-case` — Whether to rename an extant label if\n  its name differs in case from the name given on the command line [default:\n  `--enforce-case`]\n\n- `--on-rename-clash \u003cignore|warn|error\u003e` — Specify what to do if the label\n  exists and one or more `--rename-from` labels also exist:\n    - `ignore`: Do nothing\n    - `warn` *(default)*: Emit a warning\n    - `error`:  Fail with an error\n\n- `--rename-from LABEL` — If `LABEL` exists, rename it to the label name\n  provided as the argument to `make`.\n\n  This option can be specified multiple times.  If multiple `--rename-from`\n  labels exist, an error will occur.\n\n- `-R REPO`/`--repository REPO` — Specify the GitHub repository to operate on.\n\n- `--update`/`--no-update` — Whether to update the label if its color and/or\n  description do not match the values given on the command line [default:\n  `--update`]\n\n\nConfiguration File\n------------------\n\n`labelmaker`'s configuration file may be written in [JSON][], [JSON5][],\n[TOML][], or [YAML][]; the file type is determined automatically based on the\nfile extension.  The file contains a top-level mapping with the following\nfields:\n\n[JSON]: https://www.json.org\n[JSON5]: https://json5.org\n[TOML]: https://toml.io\n[YAML]: https://yaml.org\n\n- `defaults` — A mapping of default label settings to apply to all labels in\n  this configuration file.  Any field that can be set on a label can be set\n  here, other than `name` and `rename-from`.  File-wide defaults can be\n  overridden for specific profiles via the `profiles.*.defaults` mappings.\n\n    - The `defaults` mapping may also contain a `profile` string field\n      specifying the default profile for `apply` to use when no `--profile`\n      option is given; the default profile is `default`.\n\n- `profiles` — A mapping from profile names to profile definitions.  A\n  *profile* is a set of label definitions that can be selected when invoking\n  `apply`.  Each profile is defined by a mapping with the following fields:\n\n    - `defaults` — A mapping of default label settings to apply to all labels\n      in this profile.  Any field that can be set on a label can be set here,\n      other than `name` and `rename-from`.  Settings set here override settings\n      set in the top-level `defaults` mapping for the labels in this profile.\n\n    - `labels` — A list of label specifications; each one is a mapping with the\n      following fields:\n\n        - `name` *(required)* — The name of the label.  Leading \u0026 trailing\n          whitespace will be trimmed; if the resulting string is empty, is it\n          an error.\n\n            - Note that GitHub treats label names case-insensitively; thus, the\n              names \"foo\" and \"Foo\" refer to the same label.  If you do or do\n              not want your label names to enforce a specific casing, see the\n              `enforce-case` option below.\n\n            - It is an error if two or more labels in the same profile have the\n              same name after case-folding.\n\n        - `color` — The color to use for the label.  Colors can be specified as\n          a hex RGB string `\"#rrggbb\"` (with or without leading `#`) or as [CSS\n          color names][].  Alternatively, `color` may be set to a list of\n          colors, in which case one of the colors will be picked at random when\n          creating the label, and no change will be made to the label color\n          when updating the label.  An empty list is equivalent to\n          `[\"#000000\"]`.\n\n          The default `color` value is a list of the default colors displayed\n          when creating a new label in the GitHub web UI as of 2023-09-24.\n\n        - `description` — The description to apply to the label.  If this is\n          not set, the description will be empty when creating the label, and\n          no change will be made to the description when updating the label.\n\n        - `create` (boolean; default: `true`) — If true, the label does not\n          already exist, and no label specified in `rename-from` exists (See\n          below), then the label will be created in GitHub.\n\n        - `update` (boolean; default: `true`) — If true, the label exists (or a\n          label specified in `rename-from` is being renamed to it), and the\n          color and/or description of the pre-existing label differs from the\n          value given in the configuration file, update the fields that differ.\n\n        - `enforce-case` (boolean; default: `true`) — If true and the label\n          exists but the name of the label in GitHub differs from the name in\n          `name` when compared case-sensitively, update the label to use the\n          casing specified in the configuration file.\n\n        - `rename-from` — A list of label names; if the label given in the\n          `name` field does not exist in the repository, but one of the labels\n          in `rename-from` does, then the existing label will be renamed to the\n          given `name`.  If multiple labels in `rename-from` exist, an error\n          will occur.\n\n            - If the label given in `name` does exist and so do one or more\n              labels in `rename-from`, a warning is emitted by default; see the\n              `on-rename-clash` option below.\n\n            - It is an error if a label includes its own name in `rename-from`.\n\n            - It is an error if a label specified by a profile is also in the\n              `rename-from` list of another label in the same profile.\n\n            - It is an error if a label is listed in the `rename-from` fields\n              of two or more labels in the same profile.\n\n        - `on-rename-clash` — Specify what to do if the label exists and one or\n          more labels listed in `rename-from` also exist.  The possible values\n          are:\n\n            - `\"ignore\"` — Do nothing.\n            - `\"warn\"` *(default)* — Emit a warning.\n            - `\"error\"` — Fail with an error.\n\n[CSS color names]: https://www.w3.org/TR/css-color-4/#named-colors\n\n### Example Configuration File\n\nThe following TOML configuration shows the default GitHub labels as of\n2023-10-18, along with the default value of the `color` setting:\n\n```toml\n[defaults]\ncolor = [\n    \"0052cc\",\n    \"006b75\",\n    \"0e8a16\",\n    \"1d76db\",\n    \"5319e7\",\n    \"b60205\",\n    \"bfd4f2\",\n    \"bfdadc\",\n    \"c2e0c6\",\n    \"c5def5\",\n    \"d4c5f9\",\n    \"d93f0b\",\n    \"e99695\",\n    \"f9d0c4\",\n    \"fbca04\",\n    \"fef2c0\",\n]\n\n[[profiles.default.labels]]\nname = \"bug\"\ncolor = \"d73a4a\"\ndescription = \"Something isn't working\"\n\n[[profiles.default.labels]]\nname = \"documentation\"\ncolor = \"0075ca\"\ndescription = \"Improvements or additions to documentation\"\n\n[[profiles.default.labels]]\nname = \"duplicate\"\ncolor = \"cfd3d7\"\ndescription = \"This issue or pull request already exists\"\n\n[[profiles.default.labels]]\nname = \"enhancement\"\ncolor = \"a2eeef\"\ndescription = \"New feature or request\"\n\n[[profiles.default.labels]]\nname = \"good first issue\"\ncolor = \"7057ff\"\ndescription = \"Good for newcomers\"\n\n[[profiles.default.labels]]\nname = \"help wanted\"\ncolor = \"008672\"\ndescription = \"Extra attention is needed\"\n\n[[profiles.default.labels]]\nname = \"invalid\"\ncolor = \"e4e669\"\ndescription = \"This doesn't seem right\"\n\n[[profiles.default.labels]]\nname = \"question\"\ncolor = \"d876e3\"\ndescription = \"Further information is requested\"\n\n[[profiles.default.labels]]\nname = \"wontfix\"\ncolor = \"ffffff\"\ndescription = \"This will not be worked on\"\n```\n\nThat same configuration, in YAML:\n\n```yaml\ndefaults:\n  color:\n    - \"0052cc\"\n    - \"006b75\"\n    - \"0e8a16\"\n    - \"1d76db\"\n    - \"5319e7\"\n    - \"b60205\"\n    - \"bfd4f2\"\n    - \"bfdadc\"\n    - \"c2e0c6\"\n    - \"c5def5\"\n    - \"d4c5f9\"\n    - \"d93f0b\"\n    - \"e99695\"\n    - \"f9d0c4\"\n    - \"fbca04\"\n    - \"fef2c0\"\n\nprofiles:\n  default:\n    labels:\n      - name: bug\n        color: \"d73a4a\"\n        description: Something isn't working\n\n      - name: documentation\n        color: \"0075ca\"\n        description: Improvements or additions to documentation\n\n      - name: duplicate\n        color: \"cfd3d7\"\n        description: This issue or pull request already exists\n\n      - name: enhancement\n        color: \"a2eeef\"\n        description: New feature or request\n\n      - name: good first issue\n        color: \"7057ff\"\n        description: Good for newcomers\n\n      - name: help wanted\n        color: \"008672\"\n        description: Extra attention is needed\n\n      - name: invalid\n        color: \"e4e669\"\n        description: This doesn't seem right\n\n      - name: question\n        color: \"d876e3\"\n        description: Further information is requested\n\n      - name: wontfix\n        color: \"ffffff\"\n        description: This will not be worked on\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwodder%2Flabelmaker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjwodder%2Flabelmaker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwodder%2Flabelmaker/lists"}