/github-to-server

Primary LanguagePythonGNU Affero General Public License v3.0AGPL-3.0

Setup

  1. Clone the repo you want to set up.

    • git clone https://github.com/username/reponame/
  2. Get the code and customize it to your liking.

    • Requirements:
      • Flask: pip install flask
      • If you are using a web server like nginx, set up the necessary configurations in the configuration files.
        • Example nginx configurations;
        location /github-to-server {
             proxy_pass http://localhost:5000;
             proxy_set_header Host $host;
             proxy_set_header X-Real-IP $remote_addr;
             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }
        
  3. Go to the cloned github repo and open the settings section. Webhook

  4. Click on Webhook and create a new webhook.

    • Enter the address you set up on the server.
    • Set up a secret key for yourself.
  5. Add the key you have set up to your code and run the code.