{"id":17208636,"url":"https://github.com/chevdor/glabel","last_synced_at":"2025-04-13T22:33:49.682Z","repository":{"id":39449501,"uuid":"429071704","full_name":"chevdor/glabel","owner":"chevdor","description":"A cli utility written in Rust that allows fetching all the labels of a project, save those as a YAML file that you can easily edit or save as backup and apply a saved preset to new repositories.","archived":false,"fork":false,"pushed_at":"2023-04-21T15:23:19.000Z","size":195,"stargazers_count":4,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T18:52:37.709Z","etag":null,"topics":["chevdor","cli","github","labels","productivity","rust","tool"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/chevdor.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}},"created_at":"2021-11-17T14:11:00.000Z","updated_at":"2024-03-14T02:39:09.000Z","dependencies_parsed_at":"2023-02-09T11:16:40.944Z","dependency_job_id":null,"html_url":"https://github.com/chevdor/glabel","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chevdor%2Fglabel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chevdor%2Fglabel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chevdor%2Fglabel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chevdor%2Fglabel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chevdor","download_url":"https://codeload.github.com/chevdor/glabel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248790906,"owners_count":21162111,"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":["chevdor","cli","github","labels","productivity","rust","tool"],"created_at":"2024-10-15T02:49:24.008Z","updated_at":"2025-04-13T22:33:49.605Z","avatar_url":"https://github.com/chevdor.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# glabel\n\n## Intro\n\nA utility to import (=`get`) and export (=`apply`) Github labels.\n\n## Install\n\n    cargo install --git https://github.com/chevdor/glabel --locked\n    glabel --help\n\nYou may also enable the `wipe` feature but bare in mind that it comes with a rather high risk unless you know well what you are doing.\n\n## Usage\n\n### Help\n\n      apply  Apply a label set from a given file\n      help   Print this message or the help of the given subcommand(s)\n\n    Options:\n      -h, --help     Print help\n      -V, --version  Print version\n\n### Get\n\n    Options:\n      -o, --output \u003cOUTPUT\u003e  The output filename\n      -h, --help             Print help\n      -V, --version          Print version\n\nWithout passing the `--output|-o` flags, the labels will be shown in your terminal as:\n\n     - bug                      [d73a4a]: Something isn't working\n     - documentation            [0075ca]: Improvements or additions to documentation\n     - duplicate                [cfd3d7]: This issue or pull request already exists\n     - enhancement              [a2eeef]: New feature or request\n     - good first issue         [7057ff]: Good for newcomers\n     - help wanted              [008672]: Extra attention is needed\n     - invalid                  [e4e669]: This doesn't seem right\n     - question                 [d876e3]: Further information is requested\n     - wontfix                  [ffffff]: This will not be worked on\n\nHowever, if you provide an output file, the yaml will be stored as:\n\n    name: chevdor/glabel\n    description: Import from chevdor/glabel\n    labels:\n    - name: bug\n      description: Something isn't working\n      color: d73a4a\n    - name: documentation\n      description: Improvements or additions to documentation\n      color: 0075ca\n    - name: duplicate\n      description: This issue or pull request already exists\n      color: cfd3d7\n    - name: enhancement\n      description: New feature or request\n      color: a2eeef\n    - name: good first issue\n      description: Good for newcomers\n      color: 7057ff\n    - name: help wanted\n      description: Extra attention is needed\n      color: 008672\n    - name: invalid\n      description: This doesn't seem right\n      color: e4e669\n    - name: question\n      description: Further information is requested\n      color: d876e3\n    - name: wontfix\n      description: This will not be worked on\n      color: ffffff\n\n### Apply\n\n      \u003cINPUT\u003e       The filename where your set is stored\n\n    Options:\n      -t, --token \u003cTOKEN\u003e  If you follow good security practices, your GITHUB_TOKEN should not have write access to your repos. Here since we need to write labels, we use another variable for the token with write access. It is highly recommended to pass this as an Environment variable [env: TOKEN=\u003cyour admin token\u003e]\n      -r, --replace        By default, existing labels will NOT be updated. If you set this flag to true, they will. Beware, there is no automatic backup so it could be a good idea to run the `get` command first and make a backup\n      -d, --dry-run        Do not change anything, print only what will be done\n      -h, --help           Print help\n      -V, --version        Print version\n\n### Wipe\n\n    Options:\n      -t, --token \u003cTOKEN\u003e  If you follow good security practices, your GITHUB_TOKEN should not have write access to your repos. Here since we need to write labels, we use another variable for the token with write access. It is highly recommended to pass this as an Environment variable [env: TOKEN=\u003cyour admin token\u003e]\n      -a, --apply          By default, for your safety, the command will NOT do anything. If you however pass this flag, there will be no way back :) It is highly recommended to call `get` first and backup your labels but keep in mind that it does not save which labels are applied to PRs and issues. So if you have labels \"in use\", you will lose them\n      -h, --help           Print help\n      -V, --version        Print version\n\n### Documentation\n\nIf you feel fancy (and lazy), you may even generate a documentation from your tags using [tera-cli](https://github.com/chevdor/tera-cli).\n\nUsing the [template](templates/doc.md.tera) in this repo and the following command:\n\n    tera --template templates/doc.md.tera doc/sample_yaml.yaml\n\nWill generate the following output:\n\n    This is the documentation for your set named `chevdor/glabel`.\n\n    It contains 9 labels:\n\n    - `bug`: *Something isn't working*\n    - `documentation`: *Improvements or additions to documentation*\n    - `duplicate`: *This issue or pull request already exists*\n    - `enhancement`: *New feature or request*\n    - `good first issue`: *Good for newcomers*\n    - `help wanted`: *Extra attention is needed*\n    - `invalid`: *This doesn't seem right*\n    - `question`: *Further information is requested*\n    - `wontfix`: *This will not be worked on*\n\n## Doc generation using tera\n\nAfter installing \\[tera\\](\u003chttps://github.com/chevdor/tera-cli\u003e), you can use a simple template such as the one provided below in order to generate a nice markdown documentation of your labels:\n\nFirst setup the repo to work on:\n\n    REPO=chevdor/glabel\n\nUse glabel to get all the labels:\n\n    glabel get -o data.yaml $REPO\n\nCreate the following template as `template.md.tera`:\n\n    # Github labels for {{ name }}\n\n    ## Description\n\n    {{ description }}\n\n    ## List of the labels:\n    {% for label in labels %}\n    - `{{ label.name }}`: {{ label.description }}\n    {%- endfor %}\n\nFinally apply the template:\n\n    tera -t template.md.tera data.yaml \u003e doc.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchevdor%2Fglabel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchevdor%2Fglabel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchevdor%2Fglabel/lists"}