Hacktoberfest is a celebration of open-source software during the month of October that is run by the Community team at DigitalOcean in partnership with GitHub.
My Roles/Contributions
For Hacktoberfest 2016, I took on a myriad of roles. I was responsible for setting up the infrastructure, helping code the front-end, setting up data visualizations and analytics, and also coding the task runner that would parse and validate pull requests and send out the appropriate prize code emails to users based on whether or not they finished the Hacktoberfest challenge.
Setup the Infrastructure
My main role was getting the infrastructure and processes setup so that we could have the Hacktoberfest application up and running. In order to do this, I had to provision a clean MySQL database via Chef and setup the processes for deploying the Hacktoberfest application to our Kubernetes cluster. For Hacktoberfest, we had one primary MySQL database and two replica read-only databases as backup. The Rails application was deployed to an internal Kubernetes cluster, which allowed us to scale it as necessary according to traffic. We were able to keep track of performance through various Kibana dashboards that plotted data exported by Prometheus. We kept track of performance both at the application server level and the database server level, in case something went wrong. Also, we were able to use Sentry to track errors in the application, just in case something went wrong and we needed to fix it.
Some Front-End Work
While I had a minimal role in the front-end outside of initial styling work, I was responsible for setting up the various routes in the Rails application.
Developed the Automated Pull Request Parser
I will say that the backbone of the application was through the Pull Request Parser that I built using GitHub’s API. Using GitHub’s Search API, we were able to refine the search for each user’s pull requests and store them in our databases. In previous years, pull requests had to be verified manually but through automating this process, it allowed us to save time and human resources. Additionally, as we got reports of spamming of various pull requests due to Hacktoberfest, I tweaked the parser in order to check validity of pull requests and disqualify pull requests that were not genuine (meaning no original commits by a user in the pull request or those that maintainers marked as invalid).
Automated the Sending of Prize Emails
Through creating a task runner for running the pull request parser, I furthered added onto the task runner by adding a task for sending out prize emails later on in the month. After the pull request parser finishes running, the code assignment task would run. Afterwards, it would check to see if there were any users assigned a code that hadn’t had an email sent out, and then send out emails to those relevant users. Once again, this was an automated version of a previously manual task, so this saved a lot of time in the long run.
Setup Data Analytics & Visualizations
For data analytics and visualizations, I hooked up our MySQL database to Looker. This allowed us to quickly query the database and get answers for the Community team and also made it easy for me to build out various dashboards for visualizing key metrics for tracking the success of Hacktoberfest. Some examples of metrics that we visualized through Looker were number of pull requests opened, total users registered, user registrations per day, most active users, most popular repos, and most popular organizations.
Conclusion
Hacktoberfest 2016 was a fun project that allowed me to wear a lot of different hats while working on it. Additionally, what my team and I built during Hacktoberfest allows it to be reused in subsequent years. It was a joy to work on it and I hope y'all participate in the next Hacktoberfest!