Taine is the main bot to track Avrae bugs and feature requests in Discord.
Taine is currently set to listen for issues on avrae/avrae, avrae/avrae.io, avrae/avrae-service, and avrae/taine. Whenever an issue is opened on any of those repositories, it follows this logic:
- Is the issue tagged with
enhancement
?- If so, the issue is an internal improvement. Taine does not track it.
- Is the issue tagged with
featurereq
?- If so, track the issue and copy it to the Avrae Development Discord Server. Taine will set up a post in the tracker channel to allow users to vote on it.
- Is the issue tagged with
bug
, or untagged?- If so, track the issue as a bug and copy it to the Avrae Development Discord Server.
Taine also listens to reports on the Avrae Development Discord Server. Whenever a report comes in that matches the proper formatting, it follows this logic:
- Is the report logged to #bug-reports?
- If so, the ticket is logged as a bug report to avrae/avrae.
- Is the report logged to #feature-request and does it have more than 5 upvotes?
- If so, the ticket is logged as a feature request to avrae/avrae.
- Is the report logged to #web-reports?
- If so, the ticket is logged to avrae/avrae.io.
- Is the report logged to #api-reports?
- If so, the ticket is logged to avrae/avrae-service.
- Is the report logged to #taine-reports?
- If so, the ticket is logged to avrae/taine.
- Python 3.6
Set the following environment variables:
DISCORD_TOKEN
- a Discord bot token.GITHUB_TOKEN
- a Github Personal Access Token.ORG_NAME
- name of the GitHub org your repos are in, defaults toavrae
.
Other configuration is via constants.py
:
OWNER_IDS
- A list of the Discord User IDs of the bot's owners. Used to check if a user can run owner-only commands.BUG_LISTEN_CHANS
- a list of dictionaries representing what channels to listen in, and the identifier and repo associated with that channel.REPO_ID_MAP
- a dictionary defining what repos to listen for issues on, and the default identifier for issues opened on those repos.TRACKER_CHAN
- the Discord Channel ID of the channel to post all generated reports.OWNER_GITHUB
- issues closed by anyone other than this username will not be marked as pending for next patch.MY_GITHUB
- the GitHub username of the bot.REACTIONS
- a list of Unicode/Discord reactions that the bot will react to reports with.
All constants must be unique.
These environment variables are optional:
FR_APPROVE_THRESHOLD
(default 5) - The minimum score for feature requests to be added to GitHub.FR_DENY_THRESHOLD
(default -3) - The score for feature requests to be automatically closed if they fall under it.SENTRY_DSN
- DSN for Sentry.
- Create a virtual environment:
python3 -m venv venv
. - Activate the virtual environment:
source venv/bin/activate
on Unix (bash/zsh),venv\Scripts\activate.bat
on Windows. You need to do this each time you open a new shell/command prompt. - Install the required Python packages:
pip install -r requirements.txt
. - Run the bot:
python bot.py
Maintainers try to review PRs in a timely manner. A good PR should be descriptive, unique, and useful. Additionally, code should be readable and conform to PEP-8 standards.