Changeset 13026
- Timestamp:
- 12/07/2023 05:14:02 PM (12 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/api.wordpress.org/public_html/dotorg/matrix/trac-bot.php
r13025 r13026 14 14 namespace Dotorg\Matrix\Trac { 15 15 16 define( 'DISABLE_TRAC_TICKETS_UPDATION', true ); // For testing, this prevents test stuff to be posted on Trac tickets.17 16 define( 'REPOST_MATRIX_LINK_TIME', 300 ); // 5 mins 18 17 define( 'REPOST_TRAC_COMMENT_TIME', 7200 ); // 2 hrs … … 33 32 34 33 $room_alias_local_part = ltrim( explode( ':', $_POST['room_alias'] )[0], '#' ); 34 35 define( 'IS_MATRIX_TESTING_ROOM', $room_alias_local_part === 'matrix-testing' ); 35 36 36 37 // Prevent frequent posting to both Matrix & Trac using Redundancy Manager. … … 120 121 } 121 122 122 if ( ! DISABLE_TRAC_TICKETS_UPDATION) {123 if ( ! IS_MATRIX_TESTING_ROOM ) { 123 124 if ( defined( TRACBOT_WPORG_PASSWORD ) && ! empty( TRACBOT_WPORG_PASSWORD ) ) { 124 125 $trac_xmlrpc = new \Trac( 'matrixbot', TRACBOT_WPORG_PASSWORD, "https://$trac.trac.wordpress.org/login/xmlrpc" ); … … 152 153 $redundancy_manager->set( 'trac', $trac, 'ticket', $ticket_id ); 153 154 154 if ( ! DISABLE_TRAC_TICKETS_UPDATION) {155 if ( ! IS_MATRIX_TESTING_ROOM ) { 155 156 isset( $trac_xmlrpc ) && $trac_xmlrpc->ticket_update( $ticket_id, $trac_comment ); 157 } else { 158 $matrix_message[] = "[$trac] Trac comment: " . $trac_comment; 156 159 } 157 160 }
Note: See TracChangeset
for help on using the changeset viewer.