This is a simple bot that automatically makes a commit to your GitHub repository whenever the script runs. This guide will walk you through the steps to set up and use the bot, even if you're new to GitHub and Git.
Before you begin, make sure you have the following:
-
A GitHub Account: If you don't have one, sign up here.
-
Git Installed on Your System: Download and install Git from this link. Follow the instructions for your operating system.
-
Fork the Repository: Click the "Fork" button at the top right corner of the repository page on GitHub.
-
Clone the Repository:
-
Open your terminal or command prompt.
-
Run the following command to clone the repository to your local machine:
git clone https://github.com/YOUR_USERNAME/daily-commit-bot.git
Replace
YOUR_USERNAME
with your GitHub username.
-
- Download Node.js: If you don't have Node.js installed, download it from here.
- Install Node.js and npm: Follow the installation instructions for your operating system. npm (Node Package Manager) comes bundled with Node.js.
-
Navigate to the Project Directory:
cd daily-commit-bot
-
Install Dependencies: Run the following command to install the necessary packages:
npm install
-
Open the
server.js
file in your preferred code editor (e.g., VSCode, Sublime Text). -
Configure the following variables:
const username = "YOUR_GITHUB_USERNAME";
const email = "YOUR_GITHUB_EMAIL";
const repoPath = "YOUR_LOCAL_REPO_PATH"; // e.g., "D:/Projects/daily-commit-bot"
Replace the placeholders with your GitHub username, email, and the path to your local repository.
After configuring the script, you're ready to run it:
node server.js