sotirisspace / repo-ranger

Repo-Ranger is an AI-powered Github leaderboard that has no AI. It analyzes your Github activity and based on your score you win a clap 👏 or a 💩.
https://reporanger.xyz
GNU General Public License v3.0
6 stars 2 forks source link

[BUG] Fix Broken Score on Usernames #30

Open AkisKourouklis opened 1 month ago

AkisKourouklis commented 1 month ago

Describe the bug (required)

Now the score are calculated by the data received from GitHub. But from Github we don't get the old commits.

Expected behavior What we need to do is create a new table to save all the commits as well. Then calculate the score on demand from our own data and not from the Github API data.

Additional context (options) score.service.ts

aneesmalikdev commented 3 weeks ago

Hey @AkisKourouklis!

I like to work on this.

aneesmalikdev commented 3 weeks ago

Facing this error on starting backend:

tts@TTSG7 api % pnpm run build-start

> api@1.0.0 build-start /Users/tts/Developer/repo-ranger/api
> npm run build && npm run start

> api@1.0.0 build
> rimraf dist && tsc --noEmit false && tsc-alias

> api@1.0.0 start
> node dist/src/server.js

(node:12857) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
12:32:44.642Z ERROR repo-ranger: 
  AggregateError [ECONNREFUSED]: 
      at internalConnectMultiple (node:net:1118:18)
      at afterConnectMultiple (node:net:1685:7)
AkisKourouklis commented 3 weeks ago

Hey yes you can work on this, you can start with pnpm run dev

AkisKourouklis commented 3 weeks ago

@aneesmalikdev first do a pnpm install and then just do pnpm run dev

aneesmalikdev commented 3 weeks ago

Thanks @AkisKourouklis, I have started working on this. Here is what I am doing.

Inserting commits to table every time new username is added and in refreshUsername. And in refreshUsername, score will be calculated on based on no of commits in our table of particular username instead of GitHub Commits(Although GitHub commits will be used to update commits table).