Initial commit with the list of things to do.
GitHub OAuth2 implementation as Gerrit HTTP Auth.

First integration point for allowing  Gerrit to authenticate users through GitHub OAuth.
It relies on the installation of the github-oauth Java library under the $GERRIT_SITE/lib
in order filter all the HTTP requests through the GitHub OAuth 2.0 secure authentication.

In order to configure the GitHub authentication you need to:
- copy the github-oauth into $GERRIT_SITE/lib
- copy the github-plugin into $GERRIT_SITE/plugins
- run the Gerrit init steps by choosing HTTP Auth
- set the GitHub parameters during the GitHub custom init step

Change-Id: I0898994169fec0b477dc8944045ceba9526a4d9c
Initial version of the Pull-request plugin.

Implemented so far the GitHub SSO and retrieval
of the GitHub replication config.

Change-Id: I5669f091bc50862adcbf000a12f8a0f528f36ce6
Moving dependencies to child module.

Instead of getting all dependencies at parent Maven module
they are now defined at child level.
This allows to only include the ones effectively needed
and avoid duplications when using shaded jars.

Adding as well a copy of the Gerrit InitStep interface
as it is missing in the Gerrit API package.

Change-Id: I8c8edbc05599d1e507d269baf5d95f32b99870e7
Trigger OAuth2 handshake only when /login is invoked.

This allows OAuth2 to still allow anonymous browsing
of Gerrit without having necessarily to redirect
to GitHub.

Change-Id: Iea446165c241fb812b6e19a826bcbfc374cffe2e
OAuth-2 authentication with full name / e-mail lookup.

Instead of requiring manual Gerrit user profile registration,
the Full name and EMail are automatically retrieved at
login and stored in Gerrit as read-only.

Profile is automatically re-synched at next login
on by clicking the "Reload" button on the Gerrit
settings page.

Change-Id: I952e8e79d05f3ba102b012958afda31dd979d658
[GERRITHUB-5] SSH Key import with scope-specific OAuth login
[GERRITHUB-5] Additional logging to troubleshoot OAuth problems
[GERRITHUB-5] Parametrized Gerrit src location
[GERRITHUB-5] Adding key label during GitHub import.

Import all the keys that are present in GitHub and
not present in Gerrit, including the label assigned
in GitHub.

Avoid SSH keys duplication by checking their existence
in current Gerrit user profile.

Change-Id: I1e9ed6ea4d6e50d496041476e8c3ada6a756e391
[GERRITHUB-4] Custom registration w/ SSHKey import

- Support for Velocity macro expansion on HTML
  static files.
- Support for serving static files using Velocity
  resource resolver
- Empty header / footer, CSS and JS for branding
- Account import page as registration replacement

With this change a user can sign-in with GitHub
and complete his Gerrit profile by automatically
importing his GitHub keys into Gerrit.

Change-Id: I6edd85e9a1aefede36554d62a75f1fb77b165595
Gerrit plugins/extensions API fixed: hack removed.

The hack to use the Gerrit intermediate jars
for getting the init and server parts of Gerrit
is not needed anymore.

Change-Id: I7291a90014e51316af3cb07fd03785c1ef33acd0
[GERRITHUB-4] GitHub repositories selection and clone.

Select the GitHub repositories to be automatically
configured for replication and review with Gerrit.
When accepted, clone all remote repositories
using JGit to the corresponding Gerrit projects
as organization/repository.

Page for selection and repository clone is all
made with jQuery and AJAX calls to allow maximum
responsiveness of the page and avoid time-outs
due to long-running clone operations.

In case of failures, page is idempotent and can be
used again for cloning the remaining repositories.
All incomplete clones are automatically cleaned up
so that can be retried at a later time.

Change-Id: Iba6338bb5fbe813d78c87c444815d94814144228
[GERRITHUB-4] Set Gerrit refs/meta/config on imported repos.

Create initial Project properties (project.config
and groups) on refs/meta/config whenever a GitHub
project gets imported.

In order to allow a non-Gerrit administrator to have
full control over the imported project, assign
extra owner and GitHub-like permissions to the individual
user  that performed the operation.

P.S. In order to allow Gerrit to assign permissions
to an individual user, a SingleUserGroup plugin is
needed to be installed.

Change-Id: I596b2e80b4d9519668a1ab289d6c950139d6a922
Status update + pre-reqs and build instructions.

Change-Id: Ifa1cd5230d31b26e8134534a06d064bb2e6822d7
[GERRITHUB-4] Allow configuration of wizard steps.

Allows the plugin initial registration page
to be "linked" with further steps of a generic
initialization wizard.

Transitions are configured in gerrit.config in
the following way:

[github]
        wizardFlow = account.gh => repositories.html

The above example trigger the transition from the
account configuration to the repository selection
for import into Gerrit.

Change-Id: If25e84573e9c2197c67ae00a070c6adff3f03dab
[GERRITHUB-4] Allow configuration of GitHub scopes.

It is possible now to configure the GitHub scopes
used during login. This allows the user to get
right at the beginning the correct level of Application
grants to perform all the necessary GitHub APIs
for integrating Gerrit with GitHub.

Default is access GitHub ONLY for authentication
and name + email fetch from GitHub APIs.

Example (for accessing full USER profile):

[github]
        scopes = USER

The above example requests GitHub APIs to have
access to the full user's profile, including SSH
public keys.

Change-Id: Ia422c97fe525a18a046aeeaa7b39b3be30bb1eeb
HTTP Session reset + alignment with GerritAccount.

Store GerritAccount in the current Servlet session
and checks for its consistency. When a mismatch
is detected, session is reset to avoid sharing
of confidential information with potentially other
users.

Change-Id: I5856d05673a31be2a51c3795328070d43a1c5b5e
[GERRITHUB-4] Refactoring: decoupling repo import steps.

This refactoring allows to include a list of steps
to be executed for importing an existing GitHub
repository into Gerrit.

Currently the only two steps included are:
- Clone GitHub repository
- Create and configure a Gerrit Project

Next steps to implement will be:
- Configure Gerrit replication
- Trigger replication to check connectivity and credentials

Change-Id: Ia5ded4963d1aa274361135937e06b21a44b469de
[GERRITHUB-4] Self-config Gerrit->GitHub replication.

As last step of the GitHub repository import, the
etc/replication.config and etc/secure.config are
automatically configured to replicate from Gerrit
to GitHub.

Protocol is HTTP/S with BasicAuth, using the GitHub
username and negotiated OAuth token.

Change-Id: Iaeaa6281a5f56f2624c653ac59e787b5fbbe4993