This PR implements a requested feature (#44, #48, etc.) to maintain the LeetHub stats across different installations of LeetHub for a user. It stores the user's local stats in their specified GitHub repo and retrieves these stats once the user has authenticated and linked the repo. As such, user stats are tied to the repo linked during setup. Linking a different repo will clear your local stats, and pull in any stats from the new repo. To start a fresh session with zero stats, please do one of the following:
Click the "Reset all stats" in the extension popup panel, which will delete the local and GitHub-stored stats
Elect to create a new repo instead of linking an existing one
Notes:
There is a known issue when LeetHub is unsuccessful in uploading certain submissions. As a result, the stats may lose consistency between the local stats and the permanent ones stored in GitHub. I've identified a fix, but it will take time to confirm and test it.
If a user wishes to update the stats for all previous submissions, then you must manually resubmit each of those submissions over time. Unfortunately, the only other way is to request every single file from GitHub which would guarantee a rate limit.
You can recover any lost stats that you have committed by using git to revert to a previous commit.
This PR implements a requested feature (#44, #48, etc.) to maintain the LeetHub stats across different installations of LeetHub for a user. It stores the user's local stats in their specified GitHub repo and retrieves these stats once the user has authenticated and linked the repo. As such, user stats are tied to the repo linked during setup. Linking a different repo will clear your local stats, and pull in any stats from the new repo. To start a fresh session with zero stats, please do one of the following:
Click the "Reset all stats" in the extension popup panel, which will delete the local and GitHub-stored stats
Elect to create a new repo instead of linking an existing one
Notes: