rcos / rcos_io

The final RCOS website.
https://new.rcos.io
MIT License
3 stars 3 forks source link

Github Commits Tracker #146

Open PrinxeShamar opened 10 months ago

PrinxeShamar commented 10 months ago

GitHub Commits Tracker

Overview

Currently every user can register a github account to there profile. We also manage project data and which users are on each project. If we where to collect project github link(s) and assuming the members of the project on portal are also members of the project on github, we can aggregate commits for each user based on the projects they are on. This can be a great advantage for users as they can download there commits from portal. This can also have an impact when it comes to grading as it gives a live view at a students commits and this can be reference at mid/end of semester.

Project Extensions

GitHub to RCOS IO

To retrieve user commits, we can periodically query github for commits for each project. We can then store this snapshot of the commits in portal as to avoid multiple API requests to github (not sure of a limit). We can then match the commits to the users.

bnidevs commented 10 months ago

@Apexal do u want me to handle this

PrinxeShamar commented 10 months ago

Note: This ideally would serve as a https://bnidevs.github.io/get-my-commits/ feature in portal.

Apexal commented 10 months ago

The database is ready for this to be added any time. Projects even support multiple repositories already!

The only potential blockers are that there's no way for project owners/leads to add/remove repositories to their projects after they first created the projects. Coordinators/Faculty Advisors can of course manually repositories to projects, but it'd be better if the project lead could do so.

We should add a project edit page for project leads, and then work on this! I'll quick create an issue for the project edit page.

Apexal commented 9 months ago

We should also make use of our Redis cache to make as few calls to GitHub as possible. Maybe make refreshing the data an explicit action that students have to click to do, instead of fetching automatically every time a page is viewed.

Orrr we fetch automatically in the background every night, and offer manual refresh?

Thoughts here? How strict is the API limit for this sort of thing @bnidevs

bnidevs commented 9 months ago

@Apexal I believe it's 5000 calls an hour with a key, but getting all commits for one repo may cost more than one call because it's paginated