Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/controller/DiffusionCommitController.php
| Show First 20 Lines • Show All 619 Lines • ▼ Show 20 Lines | if ($audit_requests) { | ||||
| if ($other_requests) { | if ($other_requests) { | ||||
| $view->addProperty( | $view->addProperty( | ||||
| pht('Group Auditors'), | pht('Group Auditors'), | ||||
| $this->renderAuditStatusView($commit, $other_requests)); | $this->renderAuditStatusView($commit, $other_requests)); | ||||
| } | } | ||||
| } | } | ||||
| $author_epoch = $data->getCommitDetail('authorEpoch'); | $provenance_list = new PHUIStatusListView(); | ||||
| $committed_info = id(new PHUIStatusItemView()) | |||||
| ->setNote(phabricator_datetime($commit->getEpoch(), $viewer)) | |||||
| ->setTarget($commit->renderAnyCommitter($viewer, $handles)); | |||||
| $committed_list = new PHUIStatusListView(); | $author_view = $commit->newCommitAuthorView($viewer); | ||||
| $committed_list->addItem($committed_info); | if ($author_view) { | ||||
| $view->addProperty( | $author_date = $data->getCommitDetail('authorEpoch'); | ||||
| pht('Committed'), | $author_date = phabricator_datetime($author_date, $viewer); | ||||
| $committed_list); | |||||
| $provenance_list->addItem( | |||||
| id(new PHUIStatusItemView()) | |||||
| ->setTarget($author_view) | |||||
| ->setNote(pht('Authored on %s', $author_date))); | |||||
| } | |||||
| if (!$commit->isAuthorSameAsCommitter()) { | |||||
| $committer_view = $commit->newCommitCommitterView($viewer); | |||||
| if ($committer_view) { | |||||
| $committer_date = $commit->getEpoch(); | |||||
| $committer_date = phabricator_datetime($committer_date, $viewer); | |||||
| $provenance_list->addItem( | |||||
| id(new PHUIStatusItemView()) | |||||
| ->setTarget($committer_view) | |||||
| ->setNote(pht('Committed on %s', $committer_date))); | |||||
| } | |||||
| } | |||||
| if ($push_logs) { | if ($push_logs) { | ||||
| $pushed_list = new PHUIStatusListView(); | $pushed_list = new PHUIStatusListView(); | ||||
| foreach ($push_logs as $push_log) { | foreach ($push_logs as $push_log) { | ||||
| $pushed_item = id(new PHUIStatusItemView()) | $pusher_date = $push_log->getEpoch(); | ||||
| ->setTarget($handles[$push_log->getPusherPHID()]->renderLink()) | $pusher_date = phabricator_datetime($pusher_date, $viewer); | ||||
| ->setNote(phabricator_datetime($push_log->getEpoch(), $viewer)); | |||||
| $pushed_list->addItem($pushed_item); | |||||
| } | |||||
| $view->addProperty( | $pusher_view = $handles[$push_log->getPusherPHID()]->renderLink(); | ||||
| pht('Pushed'), | |||||
| $pushed_list); | $provenance_list->addItem( | ||||
| id(new PHUIStatusItemView()) | |||||
| ->setTarget($pusher_view) | |||||
| ->setNote(pht('Pushed on %s', $pusher_date))); | |||||
| } | } | ||||
| } | |||||
| $view->addProperty(pht('Provenance'), $provenance_list); | |||||
| $reviewer_phid = $data->getCommitDetail('reviewerPHID'); | $reviewer_phid = $data->getCommitDetail('reviewerPHID'); | ||||
| if ($reviewer_phid) { | if ($reviewer_phid) { | ||||
| $view->addProperty( | $view->addProperty( | ||||
| pht('Reviewer'), | pht('Reviewer'), | ||||
| $handles[$reviewer_phid]->renderLink()); | $handles[$reviewer_phid]->renderLink()); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 543 Lines • Show Last 20 Lines | |||||