Skip to content

Commit 1ad653b

Browse files
Broaden ticket URL regex for requests (#308)
* Broaden ticket URL regex for requests * Add servicedesk link format
1 parent 4eb5b6f commit 1ad653b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util/RequestsUtil.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export class RequestsUtil {
101101
* @returns A NEW regex object every time. You have to store it as a variable if you use `exec` on it, otherwise you will encounter infinite loops.
102102
*/
103103
public static getTicketRequestRegex(): RegExp {
104-
return new RegExp( `<?(?:https?://bugs\\.mojang\\.com/(?:browse|projects/\\w+/issues)/|\\b)${ MentionCommand.ticketPattern }>?`, 'g' );
104+
return new RegExp( `<?(?:https?://(?:report\\.)?bugs\\.mojang\\.com/(?:browse(?:/\\w+/issues)?|projects/\\w+/issues|servicedesk/customer/portal/\\d+)/|\\b)${ MentionCommand.ticketPattern }>?`, 'g' );
105105
}
106106

107107
public static async checkTicketValidity( tickets: string[] ): Promise<boolean> {

0 commit comments

Comments
 (0)