Skip to content
 
 

Latest commit

 

History

17 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Git Auto Pull UI

A simple web UI to manage and automatically pull updates for your Git repositories.

Setup

  1. Install dependencies and build the frontend:

    npm install
    npm run build
  2. Create a .env file in the root of the project and add a webhook secret:

    WEBHOOK_SECRET=your-super-secret-token
    
  3. Start the backend server:

    npm start
  4. Start the frontend development server: In a new terminal, run:

    cd frontend
    npm run dev

The application will be running at http://localhost:5173.

Testing Webhooks with ngrok

To receive webhooks from services like GitHub on your local machine, you need a way to expose your local server to the internet. ngrok is a great tool for this.

  1. Download and install ngrok from ngrok.com.

  2. With your local server running (npm start), open a new terminal and start ngrok to create a public tunnel to your local port 3000:

    ngrok http 3000
  3. Ngrok will give you a public "Forwarding" URL (it will look something like https://<random-string>.ngrok.io).

  4. Go to your repository's settings on GitHub, navigate to Webhooks, and click Add webhook.

    • Payload URL: Paste the ngrok URL and add the /api/webhook path. For example: https://<random-string>.ngrok.io/api/webhook.
    • Content type: Set this to application/json.
    • Secret: Enter the same secret you defined in your .env file for WEBHOOK_SECRET.
    • Which events would you like to trigger this webhook? Select "Just the push event."
  5. Click Add webhook. Now, whenever you push a change to your repository, GitHub will send a push event to your local server via ngrok, and the application will automatically pull the changes.

About

Git Watcher

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages