Changeset 12587
- Timestamp:
- 05/16/2023 05:12:07 AM (18 months ago)
- 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
r12538 r12587 90 90 } 91 91 92 // Check to see if the commit has touched tags that don't have known confirmed releases. 93 foreach ( $svn_changed_tags as $svn_changed_tag ) { 94 if ( 'trunk' === $svn_changed_tag ) { 95 continue; 96 } 97 98 $release = Plugin_Directory::get_release( $plugin, $svn_changed_tag ); 99 if ( ! $release ) { 100 // Use the actual version for stable releases, otherwise fallback to the tag name, as we don't have the actual header data. 101 $version = ( $svn_changed_tag === $stable_tag ) ? $headers->Version : $svn_changed_tag; 102 103 Plugin_Directory::add_release( 104 $plugin, 105 [ 106 'tag' => $svn_changed_tag, 107 'version' => $version, 108 'committer' => [ $last_committer ], 109 'revision' => [ $last_revision ] 110 ] 111 ); 112 113 $email = new Release_Confirmation_Email( 114 $plugin, 115 Tools::get_plugin_committers( $plugin_slug ), 116 [ 117 'who' => $last_committer, 118 'readme' => $readme, 119 'headers' => $headers, 120 'version' => $version, 121 ] 122 ); 123 $email->send(); 124 125 echo "Plugin release {$svn_changed_tag} not confirmed; email triggered.\n"; 126 } 127 } 128 129 // Now check to see if the stable has been confirmed. 92 130 $release = Plugin_Directory::get_release( $plugin, $stable_tag ); 93 94 // This tag is unknown? Trigger email.95 131 if ( ! $release ) { 96 Plugin_Directory::add_release( 97 $plugin, 98 [ 99 'tag' => $stable_tag, 100 'version' => $headers->Version, 101 'committer' => [ $last_committer ], 102 'revision' => [ $last_revision ] 103 ] 104 ); 105 106 $email = new Release_Confirmation_Email( 107 $plugin, 108 Tools::get_plugin_committers( $plugin_slug ), 109 [ 110 'who' => $last_committer, 111 'readme' => $readme, 112 'headers' => $headers, 113 ] 114 ); 115 $email->send(); 116 117 throw new Exception( 'Plugin release not confirmed; email triggered.' ); 132 throw new Exception( "Plugin release {$stable_tag} not found." ); 118 133 } 119 134 … … 131 146 Plugin_Directory::add_release( $plugin, $release ); 132 147 133 throw new Exception( 'Plugin release not confirmed.');148 throw new Exception( "Plugin release {$stable_tag} not confirmed." ); 134 149 } 135 150 … … 373 388 $release = Plugin_Directory::get_release( $plugin, $tag ); 374 389 375 if ( ! $release || ( $release['zips_built'] && $release['confirmations_required'] )) {390 if ( ! $release || ! $release['confirmed'] || $release['zips_built'] ) { 376 391 unset( $versions_to_build[ $i ] ); 377 392 } else { -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/email/class-release-confirmation.php
r10214 r12587 35 35 $this->user_text( $this->args['who'] ), 36 36 $this->args['readme']->name, 37 $this->args[' headers']->Version,37 $this->args['version'] ?? $this->args['headers']->Version, 38 38 esc_url( Release_Confirmation_Shortcode::generate_access_url( $this->user ) ) 39 39 );
Note: See TracChangeset
for help on using the changeset viewer.