mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 14:00:56 +01:00
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:
parent
8d3bb92b91
commit
36d9908e6c
2 changed files with 3 additions and 5 deletions
|
@ -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';
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue