This tool is intended to help make managing multiple Github repositories much easier for DX, DevRel, and Open Source Engineering teams.
We will deploy the code to pypi and create an initial release once the MVP is ready. Thank you for your support!
The default branch name for this repository has been changed to main
as of 07/23/2020.
Everyone who participates in our repo is expected to comply with our Code of Conduct.
We welcome contributions in the form of issues, pull requests and code reviews. Or you can simply shoot us an email.
We believe in open source and want to give credit where it's due. We used an amazing tutorial at testdriven.io to guide us in setting up a solid foundation using flask, docker, and (eventually) node and react. This tutorial helped us build and iterate this project successfully!
- Virtual Box
- Docker
Some example scripts don't require a running Automator web server to execute (e.g., action_items
, metrics
, opened_items
, closed_items
). Use the steps below to run these scripts.
Update the development environment with your GITHUB_TOKEN, for example:
- Copy the sample environment file to a new file:
cp .env_sample .env
- Edit the new
.env
to add your GitHub Personal Access Token - Source the
.env
file to set the variable in the current session:source .env
Install the python dependencies and activate the environment:
make install
source venv/bin/activate
python ./examples/action_items.py
python ./examples/metrics.py daily
python ./examples/metrics.py weekly
docker-machine create -d virtualbox dx-automator-dev
Setup your environment variables:
cp ./services/github/.env_sample ./services/github/.env
cp ./services/looker/.env_sample ./services/looker/.env
cp ./services/hacktoberfest/.env_sample ./services/hacktoberfest/.env
Start:
source ./init.sh
Run these commands to test if everything is working correctly.
curl http://$DX_IP/tasks/ping/pong
curl http://$DX_IP/tasks
curl http://$DX_IP/users/ping
curl http://$DX_IP/users
curl http://$DX_IP/github/ping
curl http://$DX_IP/github/members // must have the proper authorization
curl http://$DX_IP/github/is_member/<github_username> // check if a paricular GitHub username is part of your GitHub organization
curl --globoff "http://$DX_IP/github/items?repo=<repo_name>&issue_type=<issues or pull_requests>&labels[]=<label 1>?labels[]=<label 2>&states[]=<state 1>&states[]=<state 2>&limits[]=first&limits[]=100"
curl http://$DX_IP/looker/ping
curl http://$DX_IP/looker/4404
curl http://$DX_IP/hacktoberfest/ping
curl http://$DX_IP/hacktoberfest/sendgrid/leaders/2018
Grab the IP address.
echo $DX_IP
And now paste that IP into your browser and you should see a task list.
source ./stop.sh
source ./kill.sh
docker-compose -f docker-compose-dev.yml exec users-db psql -U postgres
# \c users_dev
# select * from users;
# \q
docker exec -it <container name> /bin/bash
docker-compose -f docker-compose-dev.yml restart <Name of Service>
docker-compose -f docker-compose-dev.yml run <service> python3 -m unittest <path.to.test>
For example
docker-compose -f docker-compose-dev.yml run tasks python3 -m unittest project.tests.test_tasks
curl http://$DX_IP/hacktoberfest/leaders/update
Note that by running this script a backup will be created with a file format of tasks-db-backup.[current time stamp]
.
./scripts/init-task-db
docker-compose -f docker-compose-dev.yml exec tasks-db psql -U postgres
# \c tasks_dev
# select * from tasks;
# \q
./scripts/init-task-db
python3 examples/update_rice_scores.py
python3 examples/rice_sorted_list_of_issues_and_prs.py
python ./examples/unlabeled_issues.py
python ./examples/open_security_issues.py
python ./examples/open_bugs.py
python ./examples/follow_up.py
python ./examples/code_review.py
python ./examples/releases.py
docker-machine create --driver amazonec2 dx-automator-prod
docker-machine env dx-automator-prod
eval $(docker-machine env dx-automator-prod)
docker-compose -f docker-compose-prod.yml up -d --build
DX_IP="$(docker-machine ip dx-automator-prod)"
curl http://$DX_IP/users/ping
curl http://$DX_IP/users