Description
Small python script which can automatically label issues in your github repo.
Dependencies
pip install configparser, click, request, flask
Github Robot usage
Config file template
token: Github token needed for authentication
rules: Issues labelling is based on regexp rules defined here
defaultlabel: If no rule before works for ulabelled issue, then issue gets default label defined here
searchcomments: True/False - if True, this app will search keywords also in issue's comments
Example of config.ini:
[github]
token = xxx
rules = [["searched text", "label text"], ["searched text", "label text"]]
defaultlabel = ""
searchcomments = False
Place the config.inipre> in the working directory defined in pythonanywhere.com. For example my config.ini is in /home/pilatcen/config.ini and robot.py is in /home/pilatcen/1.HW-MI-PYT/robot.py.
And then create webhook in your github repository which triggers {{request.url}}hook only on issue change (create/delete...)
Endpoints
{{request.url}} - Shows this help
{{request.url}}hook - Accept only POST request with JSON data about actions connected with issues from github.com