Git Product home page Git Product logo

prmove's Introduction

prmove

GitHub Pull Request Mover, specifically for the Ansible repo consolidation

Configuration

GITHUB_CLIENT_ID = '1ecad3b34f7b437db6d0'
GITHUB_CLIENT_SECRET = '6689ba85bb024d1b97370c45f1316a16d08bba20'
SECRET_KEY = '\\{\x86m\x01\xc7\xe6\xa1\x19\x93\xe3F\xf5\x192)\x87k0\xdd\xcb\x1d\x10%'
UPSTREAM_DIR = '/path/to/clone/of/ansible/ansible/merged/devel/branch'

Upstream Repository Clone

The path defined by UPSTREAM_DIR must:

  • Be a clone of the ansible repository to which pull requests will be submitted.
  • Have the default remote renamed from origin to upstream.
  • Been merged with the module repositories using the hacking/unify_repos.sh script from ansible/ansible.

GitHub credentials

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.

Development

When registering for local development you can use the following values:

  • Hompage URL: http://127.0.0.1:5000/
  • Authorization callback URL: http://127.0.0.1:5000/login/authorized

Secret Key

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.

Installation/Running

  1. virtualenv prmove --python /path/to/python3
  2. . prmove/bin/activate
  3. pip install -r requirements.txt

Development

Running via flask for development:

  1. PRMOVE_CONFIG=/path/to/config.conf python3 prmove.py

Production

Running via a wsgi server such as gunicorn is recommended, and potentially behind a proxy such as nginx.

  1. pip install gunicorn gevent
  2. gunicorn -k gevent -e 'PRMOVE_CONFIG=/path/to/config.py' prmove:app

nginx

upstream prmove {
    least_conn;
    server 1.2.3.4:8000;
    server 5.6.7.8:8000;
}

server {
    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;
    }
}

Local Dev Mode

  1. PRMOVE_CONFIG=/path/to/config.py python3 prmove.py

prmove's People

Contributors

gundalow avatar mattclay avatar sivel avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

ansible

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.