Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/storage/PhabricatorRepositoryCommit.php
Show All 21 Lines | final class PhabricatorRepositoryCommit | ||||
protected $repositoryID; | protected $repositoryID; | ||||
protected $phid; | protected $phid; | ||||
protected $authorIdentityPHID; | protected $authorIdentityPHID; | ||||
protected $committerIdentityPHID; | protected $committerIdentityPHID; | ||||
protected $commitIdentifier; | protected $commitIdentifier; | ||||
protected $epoch; | protected $epoch; | ||||
protected $mailKey; | protected $mailKey; | ||||
protected $authorPHID; | protected $authorPHID; | ||||
protected $auditStatus = PhabricatorAuditCommitStatusConstants::MODERN_NONE; | protected $auditStatus = DiffusionCommitAuditStatus::NONE; | ||||
protected $summary = ''; | protected $summary = ''; | ||||
protected $importStatus = 0; | protected $importStatus = 0; | ||||
const IMPORTED_MESSAGE = 1; | const IMPORTED_MESSAGE = 1; | ||||
const IMPORTED_CHANGE = 2; | const IMPORTED_CHANGE = 2; | ||||
const IMPORTED_OWNERS = 4; | const IMPORTED_OWNERS = 4; | ||||
const IMPORTED_HERALD = 8; | const IMPORTED_HERALD = 8; | ||||
const IMPORTED_ALL = 15; | const IMPORTED_ALL = 15; | ||||
▲ Show 20 Lines • Show All 341 Lines • ▼ Show 20 Lines | foreach ($requests as $request) { | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
if ($any_concern) { | if ($any_concern) { | ||||
if ($this->isAuditStatusNeedsVerification()) { | if ($this->isAuditStatusNeedsVerification()) { | ||||
// If the change is in "Needs Verification", we keep it there as | // If the change is in "Needs Verification", we keep it there as | ||||
// long as any auditors still have concerns. | // long as any auditors still have concerns. | ||||
$status = | $status = DiffusionCommitAuditStatus::NEEDS_VERIFICATION; | ||||
PhabricatorAuditCommitStatusConstants::MODERN_NEEDS_VERIFICATION; | |||||
} else { | } else { | ||||
$status = PhabricatorAuditCommitStatusConstants::MODERN_CONCERN_RAISED; | $status = DiffusionCommitAuditStatus::CONCERN_RAISED; | ||||
} | } | ||||
} else if ($any_accept) { | } else if ($any_accept) { | ||||
if ($any_need) { | if ($any_need) { | ||||
$status = | $status = DiffusionCommitAuditStatus::PARTIALLY_AUDITED; | ||||
PhabricatorAuditCommitStatusConstants::MODERN_PARTIALLY_AUDITED; | |||||
} else { | } else { | ||||
$status = PhabricatorAuditCommitStatusConstants::MODERN_AUDITED; | $status = DiffusionCommitAuditStatus::AUDITED; | ||||
} | } | ||||
} else if ($any_need) { | } else if ($any_need) { | ||||
$status = PhabricatorAuditCommitStatusConstants::MODERN_NEEDS_AUDIT; | $status = DiffusionCommitAuditStatus::NEEDS_AUDIT; | ||||
} else { | } else { | ||||
$status = PhabricatorAuditCommitStatusConstants::MODERN_NONE; | $status = DiffusionCommitAuditStatus::NONE; | ||||
} | } | ||||
return $this->setAuditStatus($status); | return $this->setAuditStatus($status); | ||||
} | } | ||||
public function getMonogram() { | public function getMonogram() { | ||||
$repository = $this->getRepository(); | $repository = $this->getRepository(); | ||||
$callsign = $repository->getCallsign(); | $callsign = $repository->getCallsign(); | ||||
▲ Show 20 Lines • Show All 114 Lines • ▼ Show 20 Lines | public function getAuthorDisplayPHID() { | ||||
} | } | ||||
$data = $this->getCommitData(); | $data = $this->getCommitData(); | ||||
return $data->getCommitDetail('authorPHID'); | return $data->getCommitDetail('authorPHID'); | ||||
} | } | ||||
public function getAuditStatusObject() { | public function getAuditStatusObject() { | ||||
$status = $this->getAuditStatus(); | $status = $this->getAuditStatus(); | ||||
return PhabricatorAuditCommitStatusConstants::newForStatus($status); | return DiffusionCommitAuditStatus::newForStatus($status); | ||||
} | } | ||||
public function isAuditStatusNoAudit() { | public function isAuditStatusNoAudit() { | ||||
return $this->getAuditStatusObject()->isNoAudit(); | return $this->getAuditStatusObject()->isNoAudit(); | ||||
} | } | ||||
public function isAuditStatusNeedsAudit() { | public function isAuditStatusNeedsAudit() { | ||||
return $this->getAuditStatusObject()->isNeedsAudit(); | return $this->getAuditStatusObject()->isNeedsAudit(); | ||||
▲ Show 20 Lines • Show All 347 Lines • Show Last 20 Lines |