Automate Your LeetCode Submissions to GitHub π
LeetCommit is a Chrome extension designed to streamline the process of saving and managing your LeetCode solutions. By integrating directly with GitHub, this extension allows developers to automatically commit their LeetCode code submissions to their GitHub repositories, making it easier to track progress and maintain a personal code repository.
- One-Time Authorization: Authorize with GitHub just once and the extension will remember your details and last selected repository. π
- Automatic Filename Generation: Fetches the problem title from LeetCode and uses it as the filename for the committed code (currently supports C++,Java,Python,Python3 and JavaScript only). π
- Effortless Commit: Push your LeetCode solutions to GitHub with a single click. β
- Update Existing Solutions: If a solution with the same filename already exists in your repository, it will be updated. If it doesn't exist, a new file will be created. π
- Folder Management: Automatically creates the required folder for organizing your solutions if it doesn't already exist. π
- Error Handling: Comprehensive error handling to provide clear feedback on the commit status, ensuring users are informed of success or failure. βοΈ
Here are some screenshots showcasing the features of LeetCommit:
LeetCommit Startup Interface π |
GitHub Authorization π |
After Successful Commit π |
-
Clone or download this repository to your local machine.
git clone https://github.com/himilsinh-sindha/LeetCommit-Extension.git
-
Open Google Chrome and navigate to
chrome://extensions/
. -
Toggle Developer Mode on (top right corner).
-
Click on Load unpacked and select the folder where you cloned/downloaded the extension (the root folder containing
manifest.json
). -
The LeetCommit extension will now appear in your Chrome extensions list.
-
Solve a Problem on LeetCode: Go to LeetCode and solve any problem. π§©
-
Submit Your Solution: After solving the problem, ensure it is successfully submitted and the code along with the analysis is visible on the screen. π
-
Open LeetCommit: Click on the LeetCommit extension icon in your browser toolbar. π§
-
Select Repository: Choose the GitHub repository where you want to commit your solution. π
-
Commit to GitHub: Click on Commit to GitHub. Your solution will be automatically committed and pushed to the selected GitHub repository. π
- Note: If there is no successfully submitted code on LeetCode, the extension will display an error message: "No code on screen".
β οΈ
- Note: If there is no successfully submitted code on LeetCode, the extension will display an error message: "No code on screen".
Contributions are always welcome! If youβd like to improve this project:
- Fork the repository.
- Create a new branch for your feature (
git checkout -b feature-branch
). - Make your changes and commit (
git commit -m 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Open a pull request and describe the changes made.
If you encounter any problems while using LeetCommit, feel free to open an issue here. π
This project is licensed under the MIT License. See the LICENSE file for details. π
If you find LeetCommit useful, please consider giving it a βοΈ on GitHub to support its development and future improvements! π