-
Notifications
You must be signed in to change notification settings - Fork 1
Contributing Guide
So you want to contribute to Status Checker? Well firstly, thank you for your consideration, please ensure that you read all of this. If you have any questions or need help, please join the Discord server and ask in our support forums.
First of all, let's make sure you're in the right place. If you're looking to report a bug or make a suggestion then that should be done in the Issues tab. If you're looking to ask a question or need help then that should be done in the Discord server. If you're looking to contribute to the codebase then you're in the right place.
If you don't know where to begin, try looking through the Issues tab. Particularly those marked with the Help wanted tag. After you've selected which issue you would like to tackle or feature you want to create, please discuss your changes with the community in the Discord server.
The codebase is broken down into two things, the app and the utilities. The app consists of helper.py and app.py which runs the app and provides utility functions that are directly useful to the app, such as firing a notification. The utilities are located in the utilities folder and are responsible for the database and other related data. The best way to learn about the app is to mess around with it.
There are two tables in the Database, the applications table and the users table. The users table contains the following keys.
{
"id" : "user ID <- randomly generated",
"subscriptions" : {
"application_id" : "the id of the application",
"notification_id" : "the id of the notification"
}
}
Wheras the applications table contains the following keys
{
id : The applications unique ID. THIS IS NOT A BOT ID
"type" : " either dbot, web or mc"
url : " the url of the application" <- only applicable for MC and WEB
bot_id : " the bot id of the application" <- only applicable for dbot
name : " the name of the application"
notifications : {
Notification_ID : {
},
}
Where the Notification_ID is a uniquely generated ID which can contain any of the following
{
Notification_ID : {
email : {
address : "the email address to send to",
content : "the content of the email"
}
sms : {
number : "the number to send to",
content : "the content of the sms"
}
discord_dm : {
id : "the id of the user to send to",
content : "the content of the dm"
}
discord_channel : {
id : "the id of the channel to send to",
content : "the content of the message"
auto_publish : bool
lock_server : bool
pin : bool
}
webhook : {
url : "the url of the webhook",
payload : "the content of the webhook"
content_type " usually application/json but can also be other types"
}
}
}
The database can be a confusiong place, if you don't understand what you're doing with it, clone the app, run the bots configuration commands and then use This VSCode extension to see into the database
Please follow these steps to have your contribution considered by the maintainers.
- Follow the Styleguides
- Ensure that your code is well documented AND tested
Please follow these styleguidlines when contributing to the codebase
Please follow the Conventional Commits standard when writing your commit messages. This makes it easier for the maintainers to understand what you've done.
This code follows the pep8 guidelines, don't worry about reading it all, the TL;DR is to just look at the other parts of the repository and be consistent.