github.com/dmaizel/tests@v0.0.0-20210728163746-cae6a2d9cee8/cmd/github-labels/archive/README.md (about) 1 # GitHub labels archive 2 3 * [Overview](#overview) 4 * [How the YAML files were created](#how-the-yaml-files-were-created) 5 * [Install and patch the `labeler` tool](#install-and-patch-the-labeler-tool) 6 * [Save GitHub labels for a repository](#save-github-labels-for-a-repository) 7 8 ## Overview 9 10 This directory contains one YAML file per repository containing the original 11 set of GitHub labels before the 12 [new ones were applied on 2019-06-04](../labels.yaml.in). 13 14 ## How the YAML files were created 15 16 This section explains how the YAML files were created. 17 18 The [`labeler`](https://github.com/tonglil/labeler) tool was used to read 19 the labels and write them to a YAML file. 20 21 ### Install and patch the `labeler` tool 22 23 This isn't ideal but our [labels database](../labels.yaml.in) mandates 24 descriptions for every label. However, at the time of writing, the `labeler` 25 tool does not support descriptions. But, 26 [there is a PR](https://github.com/tonglil/labeler/pull/37) 27 to add in description support. 28 29 To enable description support: 30 31 ```sh 32 $ go get -u github.com/tonglil/labeler 33 $ cd $GOPATH/src/github.com/tonglil/labeler 34 $ pr=37 35 $ pr_branch="PR${pr}" 36 $ git fetch origin "refs/pull/${pr}/head:{pr_branch}" 37 $ git checkout "${pr_branch}" 38 $ go install -v ./... 39 ``` 40 41 ### Save GitHub labels for a repository 42 43 Run the following for reach repository: 44 45 ```sh 46 $ labeler scan -r ${github_repo_slug} ${output_file} 47 ``` 48 49 For example, to save the labels for the `runtime` repository: 50 51 ```sh 52 $ labeler scan -r kata-container/runtime runtime.yaml 53 54 ``` 55