Making WordPress.org


Ignore:
Timestamp:
11/02/2021 07:25:50 AM (5 years ago)
Author:
dd32
Message:

Theme Directory: Slack Firehose: Include the commit message into the Slack logging when it's not an automated commit.

See #5899.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/class-wporg-themes-upload.php

    r11304 r11305  
    138138         */
    139139        protected $importing_from = 'upload';
     140
     141        /**
     142         * The SVN commit message, if user defined.
     143         *
     144         * @var string
     145         */
     146        protected $commit_msg = '';
    140147
    141148        /**
    … …  
    177184                $this->version_status = 'new';
    178185                $this->importing_from = 'upload';
     186                $this->commit_msg     = '';
    179187
    180188                // $this->tmp_dir = '';    // Temporary folder per each instance of this class. Doesn't need to be reset each time.
    … …  
    222230         * @return true|WP_Error See ::import() for error conditions.
    223231         */
    224         public function process_update_from_svn( $slug, $version, $changeset = 0, $author = '' ) {
     232        public function process_update_from_svn( $slug, $version, $changeset = 0, $author = '', $commit_message = '' ) {
    225233                $this->reset_properties();
    226234
    227235                $this->importing_from = 'svn';
    228236                $this->theme_slug     = $slug;
     237                $this->commit_msg     = $commit_message;
    229238
    230239                // Check out from SVN.
    … …  
    17611770                                                        ''
    17621771                                                ),
     1772                                ];
     1773                        }
     1774
     1775                        if ( $this->commit_msg ) {
     1776                                $fields[] = [
     1777                                        'type' => 'mrkdwn',
     1778                                        'text' => "*Commit Message:*\n{$this->commit_msg}",
    17631779                                ];
    17641780                        }
Note: See TracChangeset for help on using the changeset viewer.