Move commits to the "COMMIT" mail prefix
Summary: Fixes T9427. Currently, replies to audits/commits go to "Cxxx", but so do replies to countdowns. There is non real non-disruptive approach available here and this seems least-bad. Test Plan: - Made a comment on a commit. - Fished the reply-to address out of `bin/mail list-oubound` + `bin/mail show-outbound` (it was now "COMMIT..."). - Sent mail to that address. - Grabbed the raw message and wrote it to `mail.txt`. - Ran `cat mail.txt | ./scripts/mail/mail_handler.php --process-duplicates`. - Used `bin/mail list-inbound` + `bin/mail show-inbound` to verify receipt. - Saw comment appear on audit. Reviewers: chad Reviewed By: chad Maniphest Tasks: T9427 Differential Revision: https://secure.phabricator.com/D14163
This commit is contained in:
@@ -8,11 +8,11 @@ final class PhabricatorAuditMailReceiver extends PhabricatorObjectMailReceiver {
|
||||
}
|
||||
|
||||
protected function getObjectPattern() {
|
||||
return 'C[1-9]\d*';
|
||||
return 'COMMIT[1-9]\d*';
|
||||
}
|
||||
|
||||
protected function loadObject($pattern, PhabricatorUser $viewer) {
|
||||
$id = (int)trim($pattern, 'C');
|
||||
$id = (int)preg_replace('/^COMMIT/', '', $pattern);
|
||||
|
||||
return id(new DiffusionCommitQuery())
|
||||
->setViewer($viewer)
|
||||
|
||||
@@ -13,9 +13,7 @@ final class PhabricatorAuditReplyHandler
|
||||
}
|
||||
|
||||
public function getObjectPrefix() {
|
||||
// TODO: This conflicts with Countdown and will probably need to be
|
||||
// changed eventually.
|
||||
return 'C';
|
||||
return 'COMMIT';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user