Add an event for looking up names from repositories
Summary: Currently, we have this cumbersome `PhabricatorRepositoryCommitMessageDetailParser` hook. This is really old and outdated; I want to just use the Differential custom field parser. See T945 for a specific application. However, it allows installs to override author/committer association. Instead, provide an event hook for doing this. Test Plan: Added a listener, made every commit resolve to "turtle", parsed some commits, verified the events looked sane and they now correctly were all attributed to "turtle". Reviewers: btrahan, vrana, nh Reviewed By: btrahan CC: aran Maniphest Tasks: T1337 Differential Revision: https://secure.phabricator.com/D3040
This commit is contained in:
@@ -69,6 +69,10 @@ abstract class PhabricatorRepositoryCommitMessageDetailParser {
|
||||
|
||||
$display_name = $email->getDisplayName();
|
||||
if ($display_name) {
|
||||
$phid = $this->findUserByUserName($display_name);
|
||||
if ($phid) {
|
||||
return $phid;
|
||||
}
|
||||
$phid = $this->findUserByRealName($display_name);
|
||||
if ($phid) {
|
||||
return $phid;
|
||||
|
||||
Reference in New Issue
Block a user