Repository
https://github.com/surpassinggoogle/ulog-communities
Task Request
Pull Requests
Implementation
- Parameterized bot command and overseer max vote weight config - this was not included in the original TR specifications but a feature that surfaced during development. I needed a way for a summoner to specify the vote weight a post will get. This PR added that.
- Use MongoDB to get overseer info - This PR was a major modification because it changed the source of the overseer configuration from being hard-coded in
config.ts
to data stored in mongo db. This PR completes the TR on the back-end side, and the front-end to modify the overseer info will be developed in a new repository.
Refactors
- Use string interpolation to dynamically create failed comment; code reformats and refactor - although based on the TR, Terry was okay with having a fixed or generic template that includes all of the criteria that will be used as a reply to a summoner if he did not satisfy any of the criteria, this PR took it a step further by having a dynamic template that used flags whether to display or not a certain criterion.
- Add check if bot already voted on post; added overseer configs - as I was testing the bot, there were cases where in a post was up-voted but did not receive the new vote weight which resulted to wasted vote power. This PR added the vote check and included it in one of the up-vote criteria to be sent as a reply to a summoner.
Feature in Action
@east.autovote/ulog-ulog-communities-demo
Lesson Learned
Initially, I planned of having the overseer configuration hard-coded in config.ts
and just let Terry update the codes for additional overseers. However, a part of me was dissatisfied with this level of quality.
As someone who was mentored to practice excellence and to finish what I start, I opted to pursue implementing the overseer configuration persisted somewhere to be modifiable from a web front-end. I initially planned it to be stored in a text file, but my instinct said to go with a database.
GitHub Account
This post was made from https://ulogs.org