Name: prmove
Owner: Ansible
Description: Github Pull Request Mover, specifically for the Ansible repo consolidation
Forked from: sivel/prmove
Created: 2016-11-30 20:35:30.0
Updated: 2017-12-19 13:51:22.0
Pushed: 2016-12-13 18:36:49.0
Homepage: null
Size: 17
Language: Python
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
GitHub Pull Request Mover, specifically for the Ansible repo consolidation
UB_CLIENT_ID = '1ecad3b34f7b437db6d0'
UB_CLIENT_SECRET = '6689ba85bb024d1b97370c45f1316a16d08bba20'
ET_KEY = '\\{\x86m\x01\xc7\xe6\xa1\x19\x93\xe3F\xf5\x192)\x87k0\xdd\xcb\x1d\x10%'
REAM_DIR = '/path/to/clone/of/ansible/ansible/merged/devel/branch'
The path defined by UPSTREAM_DIR
must:
ansible
repository to which pull requests will be submitted.origin
to upstream
.hacking/unify_repos.sh
script from ansible/ansible
.You will need to register an application to provide API access. The Client ID and Secret will need to be populated as shown in the above example.
When registering for local development you can use the following values:
http://127.0.0.1:5000/
http://127.0.0.1:5000/login/authorized
This is just some secret key to use as a salt for encryption, use something like os.urandom(32)
.
If you run this on multiple servers, make sure this value matches across all servers.
virtualenv prmove --python /path/to/python3
. prmove/bin/activate
pip install -r requirements.txt
Running via flask for development:
PRMOVE_CONFIG=/path/to/config.conf python3 prmove.py
Running via a wsgi server such as gunicorn is recommended, and potentially behind a proxy such as nginx.
pip install gunicorn gevent
gunicorn -k gevent -e 'PRMOVE_CONFIG=/path/to/config.py' prmove:app
ream prmove {
least_conn;
server 1.2.3.4:8000;
server 5.6.7.8:8000;
er {
listen 80;
listen 443 ssl;
server_name prmove.example.org;
if ( $scheme != "https" ) {
rewrite /(.*) https://$host/$1 permanent;
}
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_redirect off;
location / {
try_files $uri $uri/ @pass_to_prmove;
}
location @pass_to_prmove {
proxy_pass http://prmove;
proxy_read_timeout 300s;
client_max_body_size 1m;
}
PRMOVE_CONFIG=/path/to/config.py python3 prmove.py