Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/request/DiffusionRequest.php
| Show First 20 Lines • Show All 379 Lines • ▼ Show 20 Lines | public function loadCommit() { | ||||
| if (empty($this->repositoryCommit)) { | if (empty($this->repositoryCommit)) { | ||||
| $repository = $this->getRepository(); | $repository = $this->getRepository(); | ||||
| // TODO: (T603) This should be a real query, but we need to sort out | // TODO: (T603) This should be a real query, but we need to sort out | ||||
| // the viewer. | // the viewer. | ||||
| $commit = id(new PhabricatorRepositoryCommit())->loadOneWhere( | $commit = id(new PhabricatorRepositoryCommit())->loadOneWhere( | ||||
| 'repositoryID = %d AND commitIdentifier = %s', | 'repositoryID = %d AND commitIdentifier = %s', | ||||
| $repository->getID(), | $repository->getID(), | ||||
| $this->getCommit()); | $this->getStableCommit()); | ||||
| if ($commit) { | if ($commit) { | ||||
| $commit->attachRepository($repository); | $commit->attachRepository($repository); | ||||
| } | } | ||||
| $this->repositoryCommit = $commit; | $this->repositoryCommit = $commit; | ||||
| } | } | ||||
| return $this->repositoryCommit; | return $this->repositoryCommit; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 363 Lines • Show Last 20 Lines | |||||