Skip to content

This includes a Python script and the edgedriver folder that automates pushing HackerRank solutions into GitHub

HuongNguyen0828/HackerRank_toGitHub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HackerRank Automation – Auto Push to GitHub

📌 Overview

This project contains a Python automation script that streamlines the process of managing HackerRank solutions. Instead of manually uploading files, the script automatically:

  • Collects solved challenge scripts.
  • Organizes them into the correct folder structure. (currently just SQL folder, you can customize as your needs)
  • Uses Git to push them into a GitHub repository.
  • Includes the edgedriver folder required for browser automation.

This ensures all solutions are automatically pushed to GiHub in the same time users submit the solution in HackerRank, so that your solutions are version-controlled, backed up, and easily shareable.

You can explore the repository containing my SQL solutions, which are automatically committed through this project: Access HackerRank_Solutions.


⚡ Features

  • ✅ Automates repetitive Git commands (add → commit → push).
  • ✅ Supports saving HackerRank solutions consistently.
  • ✅ Handles challenges name consistenly and automatially matching with HackerRank challenges naming
  • ✅ Helps track coding progress directly in GitHub.

🛠️ Tech Stack

  • Language: Python 3.x
  • Tools/Libraries:
    • os, subprocess (for automation)
    • git (for version control)
    • selenium (for browser tasks using edgedriver )

📂 Project Structure

┣ 📂 edgedriver/ # WebDriver dependency (if used for automation)

┣ 📂 HackerRank/ # Folder containing solved HackerRank scripts

  ┣ 📂 SQL/ # Folder containing solved SQL scripts and commits  

┣ 📜 script.py # Main Python automation script

┣ 📜 README.md # Project documentation


🛡️ Security & Privacy

✅ No Data Collection: no collect or store any of your code or data
✅ Open Source: Full transparency - review our code anytime


🚀 How It Works

  1. Clone this repository into your working folder: clone https://github.com/HuongNguyen0828/HackerRank_toGitHub/
  2. 🖥️ Set Up Microsoft Edge WebDriver
  1. Navigate to the project folder: run cd HackerRank_toGitHub
  2. Install Python dependencies: run `pip install selenium``
  3. Set your GitHub repository:
  • Create a repository to store all HackerRank solutions.

  • In script.py, replace the remote_url variable with your repository URL: remote_url = "https://github.com/YourUsername/YourRepoName"

  1. Run the automation script: run python script.py ✅ And, that’s it! Now, you can login and everytime you submit, your HackerRank solutions will now automatically push to GitHub.

Future Improvements

  • Multi-Language Support: Currently for SQL, expand to capture and organize C++, Java, JavaScript, etc. solutions
  • Supporting additional web browsers (e.g., Google Chrome, Firefox, Safari)
  • Extending automation to other platforms that don’t natively support saving code to GitHub (e.g., LeetCode).

About

This includes a Python script and the edgedriver folder that automates pushing HackerRank solutions into GitHub

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages