feat: add location detection for GitHub users and initialize PostgreSQL schema#179
Open
O2sa wants to merge 8 commits into
Open
feat: add location detection for GitHub users and initialize PostgreSQL schema#179O2sa wants to merge 8 commits into
O2sa wants to merge 8 commits into
Conversation
…te and another for the result
…QL schema - Enhanced GitHub user data model to include `login` and `location` fields. - Implemented a location detector to normalize user-provided locations into country slugs. - Updated GraphQL queries to fetch the new `login` and `location` fields. - Increased default pull request count from 250 to 300. - Added a script to initialize the PostgreSQL database schema. - Updated package dependencies, including adding `pg` for PostgreSQL support. - Refactored error handling and improved code formatting for better readability. Co-authored-by: Copilot <copilot@github.com>
…ge with hero section
- Updated country flag mapping to dynamically build from countries.json. - Introduced leaderboard_calculation table to track country calculations. - Added methods for seeding, starting, and finishing leaderboard calculations in DatabaseStore. - Enhanced location detection to utilize updated country data structure. - Improved localization for leaderboard features in Arabic and English.
- Implemented `calculate-next-country.ts` to automate leaderboard calculations. - The script connects to the PostgreSQL database and processes the next country in line. - Added logging for better tracking of the calculation process and results. refactor: update GitHub data fetching in tests - Renamed `fetchGitHubUserData` to `getUserData` for clarity. - Adjusted tests to use the new `getUserData` mock function. - Enhanced error handling in tests for GitHub API rate limits and resource limits. chore: remove unused ContributionTotals type - Deleted `ContributionTotals` type from GitHub types and related fixtures. - Updated user score input to remove contributions from its structure.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
feat: Add location detection and country leaderboard infrastructure
Core Features
calculate-next-country.tsscript to automate leaderboard calculations for countriesloginandlocationfieldsloginandlocationfieldsDatabase & Infrastructure
leaderboard_calculationtable to track country calculation progresspgfor PostgreSQL support)Code Quality & Refactoring
fetchGitHubUserDatatogetUserDatafor claritycountries.jsonContributionTotalstype from GitHub types and fixtures