After completing my Google Summer of Code assignment, I had an idea in my mind for a project where the hard-working people on GNOME, known as GNOME Hackers, could be appreciated based on the amount of work they do for the FLOSS community. In the quest for the same, I wrote a leaderboard web app, GNOME Hackers. It was an awesome experience and I utilized my weekends very well by learning many new things. I will give a brief of them below.
All of the GNOME groups and projects are hosted on the Gitlab instance of GNOME. The most typical activities that happen on Gitlab are commits, issues and merge requests. These form the basis for scoring that builds up the leaderboard. The data is fetched from the Gitlab Instance of GNOME using the Python wrapper for Gitlab API.
To create a static website, I could have used any Static Site Generator such as Jekyll. But this website required some logic such as scoring, selecting top hackers, giving them awards, etc., so I settled for Python. I used Frozen Flask to freeze the website into a static website which could then be hosted on Netlify. This great library reduced the codebase and gave me the power to build the website based on JAMstack.
For allocating points and building up the leaderboard, the script uses the following scheme, If you feel that a rule is biased against the others, you can open an issue and we will have a conservation regarding the same.
|Each line of commit||0.01|
|Opened Merge Request||5|
|Closed Merge Request||10|
The script gives you awards for staying on the leaderboard. You can get four types of awards:
For each day spent on the leaderboard, the hacker gets a +1 for an award, which he/she is eligible for.
Since I have a GitHub Pro pack, I get free 3000 build mins for GitHub Actions, which is an effective tool to automate the tasks. The workflow is simple and clearly explained by the graphic below.
The website builds every day at 00:00 UTC. After the workflow is executed successfully, the website build is pushed to the
website branch, which triggers a deploy script on the Netlify and publishes the website accordingly.
If you liked by work, you can appreciate the same by buying me a cup of coffee. Also, I was given GNOME Membership, while I was working on this project. It made me feel so happy and I want to thank GNOME for all the support. For this website, I am looking forward to new ideas that I can implement on the website to make it even more interesting. If you liked my project, I would love you to star it as well. These little things encourage me to work further.
Lemme know if you have any doubt, appreciation or anything else that you would like to communicate to me. You can tweet me @ravgeetdhillon. I reply to all the questions as quickly as possible. 😄 And if you liked this post, please share it with your twitter community as well.