The script grabs public Github commits and saves to your Mongodb
There are two scripts, one is for triggering the script using HTTP endpoint, the other is to run the script through a command-line interface
- MongoDB - host address & port
- Python 3
- Repository that you want
-
Launch the terminal from the folder and enter
python http_endpoint.py
-
Open browser and at the tab, enter:
host:port/<repository_owner>/<repository_file>/<mongodb_host>/<mongodb_port>
be sure to replace the value < > as shown in the example below: -
Example: your server is hosted at 192.168.0.1 and the port used is 42069 where your github repository is https://github.com/flutter/flutter therefore it should be
192.168.0.1:42069/flutter/flutter/localhost/5000
- host = 192.168.0.1
- port = 42069
- repository_owner = flutter
- repository_file = flutter
- mongodb_host = localhost
- mongodb_port = 5000
- Let it run
- Your MongoDB is now updated :D
- Launch the terminal from the folder and enter
python grab_commits.py <repository_owner> <repository_name> <mongodb_host> <mongodb_port
- Example: your server is hosted at 192.168.0.1 and the port is 69420 where your github repository is https://github.com/microsoft/vscode therefore it should be
python grab_commits.py microsoft vcode localhost 5000
as:
- repository_owner = microsoft
- repository_file = vscode
- mongodb_host = localhost
- mongodb_port = 5000
- If you used
python grab_commits.py
then just do enter the input asked - Let it run
- Your MongoDB is now updated :D