Add username parameters to hooks

When a parameter is added from an AccountInfo object, it gets
formatted as:

 Name (Email)

or if the account does not have an email address:

 Name

where "Name" can be "Anonymous Coward" if the name was not set.

From this information hooks cannot easily get the account username.

For the parameters that take an AccountInfo, automatically add an
additional parameter for the username, with the name being derived
from the AccountInfo parameter. So for example if the hook takes
the parameter:

  --change-owner Name (Email)

it will also automatically have:

  --change-owner-username username

For the ref-update and commit-received hooks that take a user,
but not from AccountInfo, explicitly add an --uploader-username
parameter.

Change-Id: Ic38358464122c11e7e8f7616fbafa14bf71aef99
4 files changed
tree: 68ecb8e2ef0e4363a46418976cfa4a80c9e8e57b
  1. .gitignore
  2. BUILD
  3. LICENSE
  4. src/