{"id":17034133,"url":"https://github.com/lordnull/github_score","last_synced_at":"2026-04-26T16:31:50.640Z","repository":{"id":138913921,"uuid":"392860295","full_name":"lordnull/github_score","owner":"lordnull","description":"A basic programming exercise for scoring users on GitHub activity.","archived":false,"fork":false,"pushed_at":"2021-08-05T17:02:33.000Z","size":82,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-22T21:42:51.135Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Erlang","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lordnull.png","metadata":{"files":{"readme":"ReadMe.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-05T00:42:06.000Z","updated_at":"2021-08-05T17:02:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"b45b3777-4eb0-4e08-b4e3-0a6050be0d2f","html_url":"https://github.com/lordnull/github_score","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lordnull/github_score","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lordnull%2Fgithub_score","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lordnull%2Fgithub_score/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lordnull%2Fgithub_score/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lordnull%2Fgithub_score/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lordnull","download_url":"https://codeload.github.com/lordnull/github_score/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lordnull%2Fgithub_score/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32305035,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T09:34:17.070Z","status":"ssl_error","status_checked_at":"2026-04-26T09:34:00.993Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T08:37:30.725Z","updated_at":"2026-04-26T16:31:50.627Z","avatar_url":"https://github.com/lordnull.png","language":"Erlang","funding_links":[],"categories":[],"sub_categories":[],"readme":"GitHub Score\n=====\n\nA score card system for users.\n\nWritten in Erlang to speed delivery of the project, though the fundamentals\nshould be the same if written in Elixir.\n\nBuilding and Running\n=====\n\nThis is in process of being implemented in elixir. To run the incomlete elixir version,\nuse `mix` or `mix test` for the tests.\n\nBuilding requires git, erlang 22.1 or newer, and make.\n\n## basic build:\n\n    make\n\n## run tests:\n\ndialyzer was not used as building the plt was time I did not yet want to spend.\nHowever, there are unit tests at least:\n\n    make tests\n\n## run a development server on port 7654:\n\nThe command below will start and interactive erlang session, and start the\nserver running on port 7654.\n\n    make shell\n\nUsage\n=====\n\nTo query the server, point a curl request (or browser) to the server and ask\nfor the user id you wish to know about:\n\n    curl \"http://localhost:7654/scores/97\"\n\nThis will likely return a \"0\" as no user has been scrapped and imported yet. To\nget some data, you can, on the erlang shell, add some:\n\n    github_score_datastore:increment_user(97, 5).\n\nThe next time you curl above, you will get \"5\". If you repeat the same increment,\nthe next curl request will be \"10\", as it keeps a running tally.\n\nImprovements\n=====\n\nThis is primarily a proof of concept, and not what I would deliver as a final\nproduct. It's close, but needs at least another day of polish. The following\nis missing:\n\n* **Logging**. Currently only otp events are logged, and only to the console. This\nmakes it unsuitable for release, but adding logging using the existing erlang\nlogger module is trivial. Mainly this is creating a reasonable default.\n* **Configuration**. The port, github url, and function that populates the datastore\nfrom the poller are all hard-coded. While the last is likely to stay that way,\nit should be moved out of the supervisor and into some module that the supervisor\ncan then reference. The others are obvious on why they should be configurable.\n* **Dialyzer**. While I've attempted to keep the types clean and documented, there\nis no replacement for a tool. Yet another relatively simple thing to add.\n* **Data storage**. The datastore is ets, which is memory only. Even a simple\nswitch to using dets, the disk backed version of ets, would be an improvement.\nFor the purpose of the project as presented, anything more is likely overkill.\nFortuately, datastore does not expose an underlying implementation, so swapping\nthat is an isolated change.\n* **Improved Polling**. The polling as implemented is very naive. It doesn't\nhandle pagination, primarily, and so could lose or miss data. This would need to\nbe shored up.\n* **Webhook**. Polling was the simplest thing that could work, and may end up\nbeing all we need. This is more of a feature that could be revisited than a\nhard requirement for me to be satisfied the job is \"done\".\n* **Documentation**. I never know if the documentation I've provided is enough\nor fully correct.\n\nSome of this would come out of code review, some from ci, and some from personal\npride. But in the interest of time, I've decided to present what I have done,\nand present what I would do if this was a real project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flordnull%2Fgithub_score","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flordnull%2Fgithub_score","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flordnull%2Fgithub_score/lists"}