Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/storage/PhabricatorRepositoryCommit.php
| Show First 20 Lines • Show All 509 Lines • ▼ Show 20 Lines | public function isAuthorSameAsCommitter() { | ||||
| $author = $this->getRawAuthorStringForDisplay(); | $author = $this->getRawAuthorStringForDisplay(); | ||||
| $committer = $this->getRawCommitterStringForDisplay(); | $committer = $this->getRawCommitterStringForDisplay(); | ||||
| return ($author === $committer); | return ($author === $committer); | ||||
| } | } | ||||
| private function getRawAuthorStringForDisplay() { | private function getRawAuthorStringForDisplay() { | ||||
| $data = $this->getCommitData(); | $data = $this->getCommitData(); | ||||
| return $data->getAuthorName(); | return $data->getAuthorString(); | ||||
| } | } | ||||
| private function getRawCommitterStringForDisplay() { | private function getRawCommitterStringForDisplay() { | ||||
| $data = $this->getCommitData(); | $data = $this->getCommitData(); | ||||
| return $data->getCommitDetail('committer'); | return $data->getCommitterString(); | ||||
| } | } | ||||
| public function newCommitRef(PhabricatorUser $viewer) { | public function newCommitRef(PhabricatorUser $viewer) { | ||||
| $repository = $this->getRepository(); | $repository = $this->getRepository(); | ||||
| $future = $repository->newConduitFuture( | $future = $repository->newConduitFuture( | ||||
| $viewer, | $viewer, | ||||
| 'internal.commit.search', | 'internal.commit.search', | ||||
| ▲ Show 20 Lines • Show All 361 Lines • ▼ Show 20 Lines | public function getFieldValuesForConduit() { | ||||
| } else { | } else { | ||||
| $committer_name = null; | $committer_name = null; | ||||
| $committer_email = null; | $committer_email = null; | ||||
| $committer_raw = null; | $committer_raw = null; | ||||
| $committer_identity_phid = null; | $committer_identity_phid = null; | ||||
| $committer_user_phid = null; | $committer_user_phid = null; | ||||
| } | } | ||||
| $author_epoch = $data->getCommitDetail('authorEpoch'); | $author_epoch = $data->getAuthorEpoch(); | ||||
| if ($author_epoch) { | |||||
| $author_epoch = (int)$author_epoch; | |||||
| } else { | |||||
| $author_epoch = null; | |||||
| } | |||||
| $audit_status = $this->getAuditStatusObject(); | $audit_status = $this->getAuditStatusObject(); | ||||
| return array( | return array( | ||||
| 'identifier' => $this->getCommitIdentifier(), | 'identifier' => $this->getCommitIdentifier(), | ||||
| 'repositoryPHID' => $this->getRepository()->getPHID(), | 'repositoryPHID' => $this->getRepository()->getPHID(), | ||||
| 'author' => array( | 'author' => array( | ||||
| 'name' => $author_name, | 'name' => $author_name, | ||||
| ▲ Show 20 Lines • Show All 55 Lines • Show Last 20 Lines | |||||