Skip to content

ClownRP/maintainer-labeler

Repository files navigation

maintainer-labeler

Suggest issue labels and priority from a small JSON rule file.

The tool is intentionally write-safe: it reads exported issue data and prints suggested labels instead of changing GitHub state. Maintainers can review the output before wiring it into a bot or GitHub Action.

Features

  • Rule-based matching against issue title and body.
  • Supports multiple labels per rule.
  • Emits JSON or Markdown.
  • Zero runtime dependencies.

Install

python -m pip install .

Usage

python -m maintainer_labeler --rules examples/rules.json --issues examples/issues.json
python -m maintainer_labeler --rules examples/rules.json --issues examples/issues.json --format markdown

Rule file

{
  "default": { "labels": ["needs-triage"], "priority": "normal" },
  "rules": [
    {
      "name": "crash reports",
      "match": ["crash", "traceback", "exception"],
      "labels": ["bug", "needs-repro"],
      "priority": "high"
    }
  ]
}

Issue input

[
  { "number": 12, "title": "Crash when importing config", "body": "Traceback..." }
]

Development

python -m unittest discover -s tests

License

MIT

About

Suggest issue labels and priority from reviewable JSON rules.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages