Changeset View
Changeset View
Standalone View
Standalone View
src/applications/audit/editor/PhabricatorAuditCommentEditor.php
| Show First 20 Lines • Show All 139 Lines • ▼ Show 20 Lines | if ($action == PhabricatorAuditActionConstants::CLOSE) { | ||||
| $actor_request = $request; | $actor_request = $request; | ||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| if (!$actor_request) { | if (!$actor_request) { | ||||
| $actor_request = id(new PhabricatorRepositoryAuditRequest()) | $actor_request = id(new PhabricatorRepositoryAuditRequest()) | ||||
| ->setCommitPHID($commit->getPHID()) | ->setCommitPHID($commit->getPHID()) | ||||
| ->setAuditorPHID($actor->getPHID()) | ->setAuditorPHID($actor->getPHID()) | ||||
| ->setAuditReasons(array("Resigned")); | ->setAuditReasons(array('Resigned')); | ||||
| } | } | ||||
| $actor_request | $actor_request | ||||
| ->setAuditStatus(PhabricatorAuditStatusConstants::RESIGNED) | ->setAuditStatus(PhabricatorAuditStatusConstants::RESIGNED) | ||||
| ->save(); | ->save(); | ||||
| $requests[] = $actor_request; | $requests[] = $actor_request; | ||||
| } else { | } else { | ||||
| ▲ Show 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | if ($action == PhabricatorAuditActionConstants::CLOSE) { | ||||
| default: | default: | ||||
| throw new Exception("Unknown or invalid action '{$action}'!"); | throw new Exception("Unknown or invalid action '{$action}'!"); | ||||
| } | } | ||||
| $request = id(new PhabricatorRepositoryAuditRequest()) | $request = id(new PhabricatorRepositoryAuditRequest()) | ||||
| ->setCommitPHID($commit->getPHID()) | ->setCommitPHID($commit->getPHID()) | ||||
| ->setAuditorPHID($actor->getPHID()) | ->setAuditorPHID($actor->getPHID()) | ||||
| ->setAuditStatus($new_status) | ->setAuditStatus($new_status) | ||||
| ->setAuditReasons(array("Voluntary Participant")) | ->setAuditReasons(array('Voluntary Participant')) | ||||
| ->save(); | ->save(); | ||||
| $requests[] = $request; | $requests[] = $request; | ||||
| } | } | ||||
| } | } | ||||
| $requests_by_auditor = mpull($requests, null, 'getAuditorPHID'); | $requests_by_auditor = mpull($requests, null, 'getAuditorPHID'); | ||||
| $requests_phids = array_keys($requests_by_auditor); | $requests_phids = array_keys($requests_by_auditor); | ||||
| ▲ Show 20 Lines • Show All 337 Lines • Show Last 20 Lines | |||||