DEV Community

Ravgeet Dhillon
Ravgeet Dhillon

Posted on • Originally published at ravgeet.dev on

Developing Leaderboard for GNOME Hackers

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.

Gitlab API

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.

Static Website

Landing page for GNOME Hackers :c-shadow

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.

Scoring

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.

Event Points
Each line of commit 0.01
Opened Merge Request 5
Closed Merge Request 10
Opened Issue 1
Closed Issue 2

Awards

The script gives you awards for staying on the leaderboard. You can get four types of awards:

  • Gold
  • Silver
  • Bronze
  • Top 10

For each day spent on the leaderboard, the hacker gets a +1 for an award, which he/she is eligible for.

GitHub Actions

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.

Workflow for GNOME Hackers :c-shadow

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.

Personal Page

Personal Profile page for GNOME Hackers :c-shadow

Links

What’s next

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.

I am looking for an internship where I can implement my skills and learn the new ones as well. If you guys have any such oppurtunity for me, you can reach me through my email.

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.

Top comments (0)