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:
parent
707b39c5b5
commit
0011068d7a
1 changed files with 6 additions and 3 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in a new issue