Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/storage/DifferentialDiff.php
<?php | <?php | ||||
final class DifferentialDiff | final class DifferentialDiff | ||||
extends DifferentialDAO | extends DifferentialDAO | ||||
implements | implements | ||||
PhabricatorPolicyInterface, | PhabricatorPolicyInterface, | ||||
PhabricatorExtendedPolicyInterface, | PhabricatorExtendedPolicyInterface, | ||||
HarbormasterBuildableInterface, | HarbormasterBuildableInterface, | ||||
HarbormasterCircleCIBuildableInterface, | HarbormasterCircleCIBuildableInterface, | ||||
HarbormasterBuildkiteBuildableInterface, | |||||
PhabricatorApplicationTransactionInterface, | PhabricatorApplicationTransactionInterface, | ||||
PhabricatorDestructibleInterface { | PhabricatorDestructibleInterface { | ||||
protected $revisionID; | protected $revisionID; | ||||
protected $authorPHID; | protected $authorPHID; | ||||
protected $repositoryPHID; | protected $repositoryPHID; | ||||
protected $commitPHID; | protected $commitPHID; | ||||
▲ Show 20 Lines • Show All 598 Lines • ▼ Show 20 Lines | /* -( HarbormasterCircleCIBuildableInterface )----------------------------- */ | ||||
} | } | ||||
public function getCircleCIBuildIdentifier() { | public function getCircleCIBuildIdentifier() { | ||||
$ref = $this->getStagingRef(); | $ref = $this->getStagingRef(); | ||||
$ref = preg_replace('(^refs/tags/)', '', $ref); | $ref = preg_replace('(^refs/tags/)', '', $ref); | ||||
return $ref; | return $ref; | ||||
} | } | ||||
/* -( HarbormasterBuildkiteBuildableInterface )---------------------------- */ | |||||
public function getBuildkiteBranch() { | |||||
$ref = $this->getStagingRef(); | |||||
// NOTE: Circa late January 2017, Buildkite fails with the error message | |||||
// "Tags have been disabled for this project" if we pass the "refs/tags/" | |||||
// prefix via the API and the project doesn't have GitHub tag builds | |||||
// enabled, even if GitHub builds are disabled. The tag builds fine | |||||
// without this prefix. | |||||
$ref = preg_replace('(^refs/tags/)', '', $ref); | |||||
return $ref; | |||||
} | |||||
public function getBuildkiteCommit() { | |||||
return 'HEAD'; | |||||
} | |||||
public function getStagingRef() { | public function getStagingRef() { | ||||
// TODO: We're just hoping to get lucky. Instead, `arc` should store | // TODO: We're just hoping to get lucky. Instead, `arc` should store | ||||
// where it sent changes and we should only provide staging details | // where it sent changes and we should only provide staging details | ||||
// if we reasonably believe they are accurate. | // if we reasonably believe they are accurate. | ||||
return 'refs/tags/phabricator/diff/'.$this->getID(); | return 'refs/tags/phabricator/diff/'.$this->getID(); | ||||
} | } | ||||
public function loadTargetBranch() { | public function loadTargetBranch() { | ||||
▲ Show 20 Lines • Show All 90 Lines • Show Last 20 Lines |