Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion data-machine-code.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function datamachine_code_register_datamachine_integrations(): void {
// Project active workspace identity into Data Machine's engine_data snapshot.
\DataMachineCode\Runtime\ActiveWorkspaceProjector::register();

if ( class_exists('DataMachine\Core\Steps\HandlerRegistrationTrait') ) {
if ( trait_exists('DataMachine\Core\Steps\HandlerRegistrationTrait') ) {
new \DataMachineCode\Handlers\GitHub\GitHub();
new \DataMachineCode\Handlers\GitHub\GitHubIssuePublish();
new \DataMachineCode\Handlers\GitHub\GitHubPullRequestPublish();
Expand Down
2 changes: 2 additions & 0 deletions tests/smoke-github-issue-publish-handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
$assert(false !== strpos($handler, "'items' => array( 'type' => 'string' )"), 'array parameters include item schemas');
$assert(false !== strpos($handler, 'GitHubAbilities::createIssue'), 'handler delegates issue creation to GitHubAbilities');
$assert(false !== strpos($settings, "'labels'") && false !== strpos($settings, "'assignees'"), 'settings expose labels and assignees defaults');
$assert(false !== strpos($plugin, "trait_exists('DataMachine\\Core\\Steps\\HandlerRegistrationTrait')"), 'plugin detects Data Machine handler registration trait with trait_exists');
$assert(false === strpos($plugin, "class_exists('DataMachine\\Core\\Steps\\HandlerRegistrationTrait')"), 'plugin does not gate trait detection with class_exists');
$assert(false !== strpos($plugin, 'new \\DataMachineCode\\Handlers\\GitHub\\GitHubIssuePublish();'), 'plugin bootstraps GitHub issue publish handler');
$assert(false !== strpos($plugin, "did_action('plugins_loaded')") && false !== strpos($plugin, 'datamachine_code_bootstrap();'), 'plugin bootstraps immediately when loaded after plugins_loaded');
$assert(false !== strpos($plugin, "'activated_plugin'") && false !== strpos($plugin, 'datamachine_code_bootstrap();'), 'plugin retries bootstrap after late activation completes');
Expand Down
Loading