Reading/Web/Pixie.py rebase tool

Setup

 * Setup a Gerrit account on wikitech and setup a labs instance
 * The web team uses BarryTheBrowserTestBot
 * Make sure you setup your Gerrit public key
 * Make sure your user is in the stream-events Gerrit group or non-interactive user group
 * (I have no idea how this happens. If you know please tell me)
 * On the labs instance clone the repo that makes use of a build step e.g. Popups extension
 * Upgrade npm to 6
 * Install git review
 * Before going any further ensure you can run `git review` without errors
 * If your labs instance differs from your Gerrit username edit ~/.ssh/config
 * Make sure your public key is valid for running:
 * Make sure your public key is valid for running:

Running

 * Clone pixies.py on your labs instance
 * Save the following in a sh file e.g. up_pixie.sh
 * Cross fingers!

In action
If set up correctly:
 * Play Debaser by the pixies (adds to the magical effect)
 * Go to a patch in the repo you just setup your bot for that has a rebase conflict that Gerrit cannot take care of.
 * Either +2 it or comment with "rebase" (a bit like "recheck" for Jenkins)
 * Watch the magic unfold.

Rebooting
An instance runs on trending.eqiad.org under the jdlrobson username. After sshing in there

Folder structure is
 * barrybot
 * pixies.py
 * Popups 
 * pixies.conf
 * up_pixie.sh

up_pixie.sh: cd $HOME/barrybot/Popups #this is the repo you want to auto-rebase for screen -c $HOME/pixies.conf -dmSL pixie $HOME/barrybot/pixies.py --project mediawiki/extensions/Popups

pixies.conf: logfile pixiep.log logfile flush 1 log on logtstamp after 1 logtstamp string "[ %t: %Y-%m-%d %c:%s ]\012" logtstamp on

To run: cd barrybot/ cd ~ ./up_pixie.sh # this launches a `screen` where Barry will watch for rebase commands
 * 1) check manually that the git repo is in a healthy state

Debugging

 * Debugging information is passed to pixies.log
 * The bot should comment shortly after your rebase command with a "message received master!" to tell you that it's attempting to grant your request or reject swiftly if not possible.