Giter Club home page Giter Club logo

gerrit-patch-uploader's Introduction

gerrit-patch-uploader

Web-based patch uploader for WMF's (or any other, if you use a different .ssh/config) gerrit system. Choose a project, enter committer name and email, commit message and unified diff, and press 'submit'.

The uploader will apply the patch and upload it for you to Gerrit. Check the response for an remote: New Changes:� remote: https://gerrit.wikimedia.org/r/...

line and follow that URL.

To upload an update to an existing patch, copy the Change-Id line from that changeset, and add it to the bottom of your commit message.

Implementation notes

We assume the gerrit instance is available using the SSH alias 'gerrit'. See sshconfig-example for an example of what to put in ~/.ssh/config.

The app now runs over CGI, via index.py.

Running locally

git clone https://github.com/valhallasw/gerrit-patch-uploader
cd gerrit-patch-uploader
# if necessary, install your system's python-httplib2 package here. The one on pypi doesn't have
# WMF's server certificates
virtualenv --system-site-packages venv
source venv/bin/activate
pip install -r requirements.txt

cp config.py.example config.py
# generate oauth keys on https://www.mediawiki.org/wiki/Special:MWOAuthConsumerRegistration, or just fill in empty values
edit config.py # adapt all four variables

cat sshconfig-example >> ~/.ssh/config
edit ~/.ssh/config # adapt identityfile, or remove the line to use ~/.ssh/id_rsa et al.

eval `ssh-agent`
ssh-add

python patchuploader.py

Deploying

Make sure you're in the gerrit-patch-uploader Tool Labs project. Then:

./deploy

Which will push the repository to github, then ssh to tools-login to deploy changes.

gerrit-patch-uploader's People

Contributors

valhallasw avatar legoktm avatar yuvipanda avatar wctaiwan avatar

Watchers

John Vandenberg avatar James Cloos avatar  avatar

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.