- Go to this webpage or if you are using ubuntu 14.04 then use the following commands on your own risk.
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
sudo apt-get update
sudo apt-get install -y mongodb-org
- Install the
pygithub
andpymongo
using pip or something else.
-
Create a database in mongodb named
github_follow
-
Now import the github_follow_follow file into the follow database using the import json command of mongodb :
mongoimport -d github_follow -c follow github_follow_follow.json
-
Similarly import the github_merged_pull_network.json file into mongodb using the impor t command
mongoimport -d github_follow -c merged_pull github_merged_pull_network.json
-
To create all the list of
payloads
,actors
,approvers
andrequesters
in mongodb, you have to run thecreateUserDB.py
andcreate_merged_pull_users.py
first. -
You should first create a index in your database. in the mongo shell you can create an index using this command e.g.
db.users.createIndex( { login: 1 } )