LeetHub: keep accepted LeetCode solutions in GitHub
Solved a LeetCode problem and want the solution in your GitHub repository? I built LeetHub to upload accepted submissions using the actual submitted source and language.
It creates the solution file and problem README, skips identical content, and supports manual upload by submission URL or ID. Setup requires a GitHub token restricted to the repository you choose.
LeetCode is the supported platform; bulk history import is not included. Install: https://chromewebstore.google.com/detail/igcdoidkkmchcpanpfbpcghbfldjfjfo
I am the developer. Feedback on your experience and confusing steps is welcome.
How it works
The key design choice is to fetch the accepted submission detail rather than copy the editor DOM. The source and language belong to the submitted solution, which avoids confusing a currently edited draft with what LeetCode actually accepted.
On the GitHub side, identical solution and README content is skipped. Updates use the default branch and non-forced branch updates, with conflict retries to avoid replacing concurrent commits. Extraction or repository errors are reported rather than counted as successful uploads.
The code uses independent popup, content-script and service-worker bundles. The repository documents type checking and Vitest checks for extraction, deduplication, conflicts and setup. For local development, build the extension and load the build directory through Chrome Developer mode.
Try the workflow
The walkthrough uses fictional data. FocusPet's completion demonstration is accelerated; the LeetHub demonstration simulates upload responses and does not perform a live GitHub write.
Source and setup: https://github.com/minjungsung/chrome-extension-leethub
Comments
No comments yet. Start the discussion.