3 final class DiffusionCommitVerifyTransaction
4 extends DiffusionCommitAuditTransaction
{
6 const TRANSACTIONTYPE
= 'diffusion.commit.verify';
7 const ACTIONKEY
= 'verify';
9 protected function getCommitActionLabel() {
10 return pht('Request Verification');
13 protected function getCommitActionDescription() {
15 'Auditors will be asked to verify that concerns have been addressed.');
18 protected function getCommitActionGroupKey() {
19 return DiffusionCommitEditEngine
::ACTIONGROUP_COMMIT
;
22 public function getIcon() {
26 public function getColor() {
30 protected function getCommitActionOrder() {
34 public function getActionName() {
35 return pht('Requested Verification');
38 public function applyInternalEffects($object, $value) {
39 $object->setAuditStatus(DiffusionCommitAuditStatus
::NEEDS_VERIFICATION
);
42 protected function validateAction($object, PhabricatorUser
$viewer) {
43 if (!$this->isViewerCommitAuthor($object, $viewer)) {
46 'You can not request verification of this commit because you '.
47 'are not the author.'));
50 if (!$object->isAuditStatusConcernRaised()) {
53 'You can not request verification of this commit because no '.
54 'auditors have raised concerns with it.'));
58 public function getTitle() {
60 '%s requested verification of this commit.',
61 $this->renderAuthor());
64 public function getTitleForFeed() {
66 '%s requested verification of %s.',
67 $this->renderAuthor(),
68 $this->renderObject());
71 public function getTransactionTypeForConduit($xaction) {
72 return 'request-verification';
75 public function getFieldValuesForConduit($object, $data) {