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