The labels.py module#

Summary#

Labels

GitHub label rule family.

LB001

The .github/labeler.yml file exists.

LB002

The .github/labels.yml file exists.

LB003

Labels.yml has a bug label.

LB004

Labels.yml has an enhancement label.

LB005

Labels.yml has a documentation label.

LB006

Labeler.yml maps labels to match rules.

LB007

Labeler.yml only assigns labels declared in labels.yml.

LB008

Labels.yml has no duplicate labels.

LB009

Labels.yml labels have a valid color.

LB010

Labels.yml labels have a description.

LB011

Labels.yml has a dependencies label.

LB012

Labels.yml has ci, tests, maintenance, and release labels.

LB013

Labels.yml has a good first issue label.

LB014

Labeler.yml labels documentation and workflow changes.

LB015

A workflow syncs labels.yml to GitHub.

LB016

No legacy .yaml label files remain.

Description#

GitHub label configuration checks.

This rule set validates the label files used by the PyAnsys labeler workflows: .github/labels.yml declares the repository labels and .github/labeler.yml assigns them to pull requests.

The checks cover:

  • Both files exist, and .github/labeler.yml is a mapping of labels to match rules

  • Every label assigned by .github/labeler.yml is declared in .github/labels.yml

  • Declared labels are unique and have a valid color and a description

  • The bug, enhancement, documentation, dependencies, ci, tests, maintenance, release, and good first issue labels are declared

  • .github/labeler.yml labels documentation and workflow changes

  • A workflow synchronizes the declared labels with GitHub

  • No legacy .yaml copies of the label files remain

Label names are compared case-insensitively, as GitHub does. Both files are parsed with yaml.BaseLoader, so every scalar, including colors such as 000000, is read as a string. Missing, unreadable, or invalid configuration is reported as an ERROR.