Add webhook to automatically import pull requests
Adds a new servlet which handles webhook events sent from Github.
The servlet forwards the payload to an EventHandler based on the type of
the event, then the handler does the actual work.
Currently "ping" and "pull_request" events are supported
Change-Id: I389f78c702dee1c59192768acffcff49e0c80a62
diff --git a/README.md b/README.md
index 5392da8..a914ac0 100644
--- a/README.md
+++ b/README.md
@@ -142,6 +142,22 @@
* ClientId []: <provided client id from previous step>
* ClientSecret []: <provided client secret from previous step>
+### Receiving Pull Request events to automatically import
+
+* Create a github user account which automatic import operation uses.
+* Register the account to your gerrit site by logging into Gerrit with the
+ account.
+* [Create webhook](https://developer.github.com/webhooks/creating/) on your
+ github repository.
+ * The payload URL should be something like
+ http://*your-gerrit-host.example*/plugins/github-plugin-*version*/webhook.
+ * It is recommended to specify some webhook secret.
+* Edit `etc/gerrit.config` and `etc/secure.config` files in your `$gerrit_site`.
+ * Add the github user account name as `webhookUser` entry in `github` section
+ of `etc/gerrit.config`
+ * Add the webhook secret as `webhookSecret` entry in `github` section of
+ `etc/secure.config`.
+
### Contributing to the GitHub plugin
The GitHub plugin uses the lombok library, which provides a set of