A Python script to get the current list of active WMF deployers via an admin yaml file and store/update within a shared, private Google Sheet.
python3
argparse
datetime
dotenv
google-api-python-client
pickle
os
re
requests
sys
urllib.parse
yaml
pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib
git clone "https://gerrit.wikimedia.org/r/wikimedia/security/deployer-audit"
- Configure
.env
to your liking and run something likeeval $(cat .env | sed 's/^/export /')
- example values provided within sample.env. - Set up Google auth via: https://developers.google.com/sheets/api/quickstart/python
- Download credentials.json file from step (2)
- Run app, which then prompt you to auth in browser via Google's App Workflow system. This should only need to happen once per install.
chmod +x DeployersToGSheet.py && ./DeployersToGSheet.py {args...}
- DeployersToGSheet.py has a few arguments:
-h
,--help
= show this help message and exit-p
,--phab
= Optionally print Phab-formatted table to stdout-n
,--nodeploys
= Only print "no deploy" users for Phab-formatted table
- Scott Bassett [sbassett@wikimedia.org]
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.