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::NONE; | protected $auditStatus = PhabricatorAuditCommitStatusConstants::MODERN_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 76 Lines • ▼ Show 20 Lines | return array( | ||||
self::CONFIG_AUX_PHID => true, | self::CONFIG_AUX_PHID => true, | ||||
self::CONFIG_TIMESTAMPS => false, | self::CONFIG_TIMESTAMPS => false, | ||||
self::CONFIG_COLUMN_SCHEMA => array( | self::CONFIG_COLUMN_SCHEMA => array( | ||||
'commitIdentifier' => 'text40', | 'commitIdentifier' => 'text40', | ||||
'mailKey' => 'bytes20', | 'mailKey' => 'bytes20', | ||||
'authorPHID' => 'phid?', | 'authorPHID' => 'phid?', | ||||
'authorIdentityPHID' => 'phid?', | 'authorIdentityPHID' => 'phid?', | ||||
'committerIdentityPHID' => 'phid?', | 'committerIdentityPHID' => 'phid?', | ||||
'auditStatus' => 'uint32', | 'auditStatus' => 'text32', | ||||
'summary' => 'text255', | 'summary' => 'text255', | ||||
'importStatus' => 'uint32', | 'importStatus' => 'uint32', | ||||
), | ), | ||||
self::CONFIG_KEY_SCHEMA => array( | self::CONFIG_KEY_SCHEMA => array( | ||||
'key_phid' => null, | 'key_phid' => null, | ||||
'phid' => array( | 'phid' => array( | ||||
'columns' => array('phid'), | 'columns' => array('phid'), | ||||
'unique' => true, | 'unique' => true, | ||||
▲ Show 20 Lines • Show All 248 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 = PhabricatorAuditCommitStatusConstants::NEEDS_VERIFICATION; | $status = | ||||
PhabricatorAuditCommitStatusConstants::MODERN_NEEDS_VERIFICATION; | |||||
} else { | } else { | ||||
$status = PhabricatorAuditCommitStatusConstants::CONCERN_RAISED; | $status = PhabricatorAuditCommitStatusConstants::MODERN_CONCERN_RAISED; | ||||
} | } | ||||
} else if ($any_accept) { | } else if ($any_accept) { | ||||
if ($any_need) { | if ($any_need) { | ||||
$status = PhabricatorAuditCommitStatusConstants::PARTIALLY_AUDITED; | $status = | ||||
PhabricatorAuditCommitStatusConstants::MODERN_PARTIALLY_AUDITED; | |||||
} else { | } else { | ||||
$status = PhabricatorAuditCommitStatusConstants::FULLY_AUDITED; | $status = PhabricatorAuditCommitStatusConstants::MODERN_AUDITED; | ||||
} | } | ||||
} else if ($any_need) { | } else if ($any_need) { | ||||
$status = PhabricatorAuditCommitStatusConstants::NEEDS_AUDIT; | $status = PhabricatorAuditCommitStatusConstants::MODERN_NEEDS_AUDIT; | ||||
} else { | } else { | ||||
$status = PhabricatorAuditCommitStatusConstants::NONE; | $status = PhabricatorAuditCommitStatusConstants::MODERN_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::newForLegacyStatus($status); | return PhabricatorAuditCommitStatusConstants::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 |