github.com/dmaizel/tests@v0.0.0-20210728163746-cae6a2d9cee8/cmd/github-labels/README.md (about)

     1  * [Overview](#overview)
     2  * [Generating the combined labels database](#generating-the-combined-labels-database)
     3  * [Checking and summarising the labels database](#checking-and-summarising-the-labels-database)
     4      * [Show labels](#show-labels)
     5      * [Show categories](#show-categories)
     6      * [Check only](#check-only)
     7      * [Full details](#full-details)
     8  * [Archive of old GitHub labels](#archive-of-old-github-labels)
     9  
    10  # Overview
    11  
    12  The Kata Project uses a number of GitHub repositories. To allow issues and PRs
    13  to be handled consistently between repositories a standard set of issue labels
    14  are used. These labels are stored in YAML format in the master
    15  [labels database template](labels.yaml.in). This file is human-readable,
    16  machine-readable, and self-describing (see the file for the introductory
    17  description).
    18  
    19  Each repository can contain a set of additional (repository-specific) labels,
    20  which are stored in a top-level YAML template file called `labels.yaml.in`.
    21  
    22  Expanding the templates and merging the two databases describes the full set
    23  of labels a repository uses.
    24  
    25  # Generating the combined labels database
    26  
    27  You can run the `github_labels.sh` script with the `generate` argument to
    28  create the combined labels database. The additional arguments specify the
    29  repository (in order to generate the combined labels database) and the name of
    30  a file to write the combined database:
    31  
    32  ```sh
    33  $ ./github-labels.sh generate github.com/kata-containers/runtime /tmp/combined.yaml
    34  ```
    35  
    36  This script validates the combined labels database by performing a number of
    37  checks, including running the `kata-github-labels` tool in checking mode. See
    38  the
    39  [Checking and summarising the labels database](#checking-and-summarising-the-labels-database)
    40  section for more information.
    41  
    42  # Checking and summarising the labels database
    43  
    44  The `kata-github-labels` tool checks and summarizes the labels database for
    45  each repository.
    46  
    47  ## Show labels
    48  
    49  Displays a summary of the labels:
    50  
    51  ```sh
    52  $ kata-github-labels show labels labels.yaml
    53  ```
    54  
    55  ## Show categories
    56  
    57  Shows all information about categories:
    58  
    59  ```sh
    60  $ kata-github-labels show categories --with-labels labels.yaml
    61  ```
    62  ## Check only
    63  
    64  Performs checks on a specified labels database:
    65  
    66  ```sh
    67  $ kata-github-labels check labels.yaml
    68  ```
    69  
    70  ## Full details
    71  
    72  Lists all available options:
    73  
    74  ```sh
    75  $ kata-github-labels -h
    76  ```
    77  
    78  # Archive of old GitHub labels
    79  
    80  See the [archive documentation](archive).