Skip to main content

Automatically labels repositories' issues or pull requests on GitHub.

Project description

# githubBot

This project tries to implement a robot that is capable of automate labeling newly added issues to given repository.

## Getting started

At first you need to have an account on github.com and this account needs to be added as a collaborator for targeted repository.

Seccondly, you need to generate a security token for this account.

This token needs to be copied to the authconfig file. By default the name of this file is "auth.cfg", but feel free to name it your way (name of your file then needs to be passed to the app through a parameter --authfile)

Default name of used token in this app is "tokenRobot". If you need to use multiple robot accounts for multiple repositories, you can add another tokens and pass suitable token name as a parameter at the start of this application.

Down below is an example of the authconfig file

```
[github]
tokenRobot = <github_token>
yourNameOfToken = <github_token>
```

## Parameters

* **--authfile** - Relative or absolute path to your authorization configure file. Default value is "auth.cfg"
* **--configfile** - Relative or absolute path to your application configure file. Default value is "configFile.cfg"
* **--timeout** - Number of secconds for checking new issues. Default value is 30 secconds
* **--tokenname** - Name of token in authorization configure file. Default value is "tokenRobot"
* **--repoowner** - Owner of the repository you would like to label issues.
* **--repository** - Name of repository for automatic labeling.
* **--defaultlabel** - Default label for not resolved issues. Default value is "NeedsLabel", but at the same time it needs to be correctly configured in the configure file.
* **--superswitch** - Indicator whether to label issues, pull_requests or both.
* **0** - Label issues and pull_requests
* **1** - Label issues only
* **2** - Label pull_requests only

## Run

```
githubbot.py console [your_parameters]

githubbot.py web [your_parameters]
```

or

```
python -m githubbot.py console [your_parameters]

python -m githubbot.py web [your_parameters]
```

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

githubbot-0.4.2.tar.gz (9.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page