diff --git a/Source/MantisSourcePlugin.class.php b/Source/MantisSourcePlugin.class.php index 3e6953c..b37265c 100644 --- a/Source/MantisSourcePlugin.class.php +++ b/Source/MantisSourcePlugin.class.php @@ -114,13 +114,6 @@ public function commit( $p_repo, $p_data ) {} /** - * Post-process changesets from checkin. - * @param object Repository - * @param array Changesets - */ - public function postcommit( $p_repo, $p_changesets ) {} - - /** * Initiate an import of changeset data for the entire repository. * @param object Repository * @return array Changesets @@ -135,14 +128,6 @@ public function import_latest( $p_repo ) {} /** - * Post-process changesets from importing latest data. - * Not called after a full import. - * @param object Repository - * @param array Changesets - */ - public function postimport( $p_repo, $p_changesets ) {} - - /** * Initialize contact with the integration framework. * @return object The plugin object */ diff --git a/Source/Source.API.php b/Source/Source.API.php index 59eca85..d51d7f0 100644 --- a/Source/Source.API.php +++ b/Source/Source.API.php @@ -357,6 +357,10 @@ foreach( $p_changesets as $t_changeset ) { $t_changeset->save(); } + + # Allow other plugins to post-process commit data + event_signal( 'EVENT_SOURCE_COMMITS', array( $p_changesets ) ); + event_signal( 'EVENT_SOURCE_FIXED', array( $t_fixed_bugs ) ); } /** diff --git a/Source/Source.php b/Source/Source.php index 5a37fb9..50830c3 100644 --- a/Source/Source.php +++ b/Source/Source.php @@ -78,6 +78,10 @@ # Allow vcs plugins to pre-process commit data 'EVENT_SOURCE_PRECOMMIT' => EVENT_TYPE_FIRST, + + # Allow other plugins to post-process commit data + 'EVENT_SOURCE_ATTACHED' => EVENT_TYPE_EXECUTE, + 'EVENT_SOURCE_FIXED' => EVENT_TYPE_EXECUTE, ); } diff --git a/Source/pages/checkin.php b/Source/pages/checkin.php index 76e7dde..fc99826 100644 --- a/Source/pages/checkin.php +++ b/Source/pages/checkin.php @@ -99,6 +99,3 @@ Source_Process_Changesets( $t_changesets ); -# Allow plugins to handle commits afterwards -$t_vcs->postcommit( $t_repo, $t_changesets ); - diff --git a/Source/pages/repo_import_latest.php b/Source/pages/repo_import_latest.php index 10a963f..6c71119 100644 --- a/Source/pages/repo_import_latest.php +++ b/Source/pages/repo_import_latest.php @@ -105,9 +105,6 @@ } Source_Process_Changesets( $t_changesets ); - - # let plugins process this batch of changesets - $t_vcs->postimport( $t_repo, $t_changesets ); } # only display results when the user is initiating the import