Making WordPress.org

Changeset 13726

Timestamp:
05/17/2024 04:15:37 AM (2 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.

Location:
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory
Files:
2 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
    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'] ) {
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/readme/class-validator.php

    r13618 r13726  
    297297                    __( 'The %1$s field is missing or invalid.  Note: We ask you no longer attempt to use %2$s as stable, so that all plugins can be rolled back.', 'wporg-plugins' ),
    298298                    '<code>Stable tag</code>',
     299
     300
     301
     302
     303
     304
     305
     306
    299307                    '<code>/trunk/</code>'
    300308                );
Note: See TracChangeset for help on using the changeset viewer.