Making WordPress.org


Ignore:
Timestamp:
05/17/2024 04:15:37 AM (6 months ago)
Author:
dd32
Message:

Plugin Directory: Import: When importing from SVN, if the plugin specifies a Stable Tag that does not exist, and we fall back to trunk, warn them.

See #6380, #6108.
Fixes #5645.

File:
1 edited

Legend:

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

    r13725 r13726  
    629629        }
    630630
     631        // Fall back to using `trunk` as stable, if the tag doesn't exist.
    631632        if ( ! $svn_info || ! $svn_info['result'] ) {
    632             $stable_tag = 'trunk';
    633             $stable_url = self::PLUGIN_SVN_BASE . "/{$plugin_slug}/trunk";
    634             $svn_info   = SVN::info( $stable_url );
    635         }
     633            if ( 'trunk' !== $stable_tag ) {
     634                $this->warnings['stable_tag_invalid_trunk_fallback'] = $stable_tag;
     635                $this->warnings['stable_tag_invalid']                = true;
     636            }
     637
     638            $stable_tag = 'trunk';
     639            $stable_url = self::PLUGIN_SVN_BASE . "/{$plugin_slug}/trunk";
     640            $svn_info   = SVN::info( $stable_url );
     641        }
    636642
    637643        if ( ! $svn_info['result'] ) {
Note: See TracChangeset for help on using the changeset viewer.