Making WordPress.org


Ignore:
Timestamp:
05/16/2024 03:06:24 AM (19 months ago)
Author:
dd32
Message:

Plugin Direcrory: When Release Confirmation is enabled, and a tag for a non-confirmed release is deleted, remove the release.

Fixes #5900.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/jobs/class-plugin-import.php

    r13234 r13711  
    1414    public static function queue( $plugin_slug, $plugin_data ) {
    1515        // To avoid a situation where two imports run concurrently, if one is already scheduled, run it 1hr later (We'll trigger it after the current one finishes).
    16         $when_to_run = time() + 10;
     16        $when_to_run = time() + 5;
    1717        if ( $next_scheduled = Manager::get_scheduled_time( "import_plugin:{$plugin_slug}", 'last' ) ) {
    1818            $when_to_run = $next_scheduled + HOUR_IN_SECONDS;
     
    3636        // Set some default values if not included from the caller.
    3737        $plugin_data['tags_touched']   ??= array( 'trunk' );
     38        $plugin_data['tags_deleted']   ??= array();
    3839        $plugin_data['revisions']      ??= [ 0 ];
    3940        $plugin_data['readme_touched'] ??= true;
     
    4243
    4344        $tags_touched = $plugin_data['tags_touched'];
     45        $tags_deleted = $plugin_data['tags_deleted'];
    4446        $revision     = max( (array) $plugin_data['revisions'] );
    4547
    4648        $importer = new CLI\Import();
    4749        try {
    48             $importer->import_from_svn( $plugin_slug, $tags_touched, $revision );
     50            $importer->import_from_svn( $plugin_slug, $tags_touched, $tags_deleted, $revision );
    4951        } catch ( Exception $e ) {
    5052            fwrite( STDERR, "[{$plugin_slug}] Plugin Import Failed: " . $e->getMessage() . "\n" );
Note: See TracChangeset for help on using the changeset viewer.