- Author: Alex Nguyen
- License: MIT
- Description: Simple python-based github bot that will fetch Github repos from a given account
- Python >= v3.6
- Clone this repo:
git clone https://github.com/usefulmana/github-bot.git
- Move to the bot folder:
cd github-bot
- Install dependencies:
pip install -r requirements.txt
- Activate your python virtual env
- Move to the app folder:
cd app
- Create a .env file with the following values (or you can use actual env variables):
AUTH_TOKEN = <GITHUB_TOKEN>
GITHUB_URL = <GET_URL>
DB_STRING = <DB_CONNECTION_STRING>
- GITHUB_TOKEN can be obtained by visiting Github → Settings → Developer Settings → Personal Access Token → Generate New Token
- GET_URL can be customised. Read more about it here
- Read about DB_CONNECTION_STRING here
- To run the app:
python bot.py
- Combine all code into the
lambda.py
file - On Windows, move the file into venv → Libs → site-packages
- Replace the
psycopg2
folder according to the instruction here - Zip the content of site-packages
- Upload to AWS Lambda
- Raise execution time limit to 30 seconds just to be safe
- Change Handler to
lambda.lambda_handler
- If you are still confused, unzip the
deploy.zip
file to see an example