Changeset 11021
- Timestamp:
- 06/08/2021 06:20:45 AM (5 years ago)
- File:
-
- 1 edited
-
sites/trunk/common/includes/slack/trac/bot.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/common/includes/slack/trac/bot.php
r11020 r11021 53 53 $tickets = array(); 54 54 55 // If the channel is not GitHub centric, match #1234 as a Trac ticket 56 if ( ! in_array( $this->get_channel(), $this->github_channels, true ) ) { 57 preg_match_all( "/(?:\s|^|\()#(?<id>$digits)(?:\-($ticket_tracs))?\b/", $text, $tickets, PREG_SET_ORDER ); 58 } 55 // If the channel is not GitHub centric, require the trac to be suffixed like #1234-core 56 $require_trac = in_array( $this->get_channel(), self::$github_channels, true ); 57 $require_trac = $require_trac ? '' : '?'; // regex optional. 58 59 preg_match_all( "/(?:\s|^|\()#(?<id>$digits)(?:\-($ticket_tracs)){$require_trac}\b/", $text, $tickets, PREG_SET_ORDER ); 59 60 60 61 // Always match trac-prefixed Tickets
Note: See TracChangeset
for help on using the changeset viewer.