1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-29 17:00:59 +01:00

Fix an issue in Harbormaster when a buildable has no repository

Summary: Not every revision belongs to a repository, so we might end up here with `$repo` still equal to `null`. Don't fatal if we do.

Test Plan: iiam

Reviewers: btrahan, hach-que, zeeg

Reviewed By: hach-que

CC: aran

Maniphest Tasks: T1049

Differential Revision: https://secure.phabricator.com/D7771
This commit is contained in:
epriestley 2013-12-13 18:20:42 -08:00
parent 707b39c5b5
commit 0011068d7a

View file

@ -183,9 +183,12 @@ final class HarbormasterBuild extends HarbormasterDAO
$repo = $object->getRepository();
}
$results['repository.callsign'] = $repo->getCallsign();
$results['repository.vcs'] = $repo->getVersionControlSystem();
$results['repository.uri'] = $repo->getPublicRemoteURI();
if ($repo) {
$results['repository.callsign'] = $repo->getCallsign();
$results['repository.vcs'] = $repo->getVersionControlSystem();
$results['repository.uri'] = $repo->getPublicRemoteURI();
}
$results['step.timestamp'] = time();
$results['build.id'] = $this->getID();