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