Page MenuHomePhabricator

NotifyBuildSystemCustomAction.php

Authored By
epriestley
Aug 11 2014, 9:24 PM
Size
1 KB
Referenced Files
None
Subscribers
None

NotifyBuildSystemCustomAction.php

<?php
final class NotifyBuildSystemCustomAction extends HeraldCustomAction {
public function appliesToAdapter(HeraldAdapter $adapter) {
return ($adapter instanceof HeraldDifferentialRevisionAdapter);
}
public function appliesToRuleType($rule_type) {
return ($rule_type == HeraldRuleTypeConfig::RULE_TYPE_GLOBAL);
}
public function getActionKey() {
return 'zeeg.build';
}
public function getActionName() {
return pht('Run Zeeg Build');
}
public function getActionType() {
return HeraldAdapater::VALUE_NONE;
}
public function applyEffect(
HeraldAdapter $adapter,
$object,
HeraldEffect $effect) {
$revision = $object;
// NOTE: This specific API might change slightly at some point.
$diff = $object->loadActiveDiff();
// Implement a call here to your external build system.
$revision_id = $revision->getID();
$diff_id = $diff->getID();
phlog("Build D{$revision_id} / diff {$diff_id}.");
return new HeraldApplyTranscript(
$effect,
true,
pht('Ran plan.'));
}
}

File Metadata

Mime Type
text/plain; charset=utf-8
Storage Engine
amazon-s3
Storage Format
Raw Data
Storage Handle
phabricator/bh/2y/zvg3curk2jy5grmq
Default Alt Text
NotifyBuildSystemCustomAction.php (1 KB)

Event Timeline