File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -61,6 +61,10 @@ export async function getPullRequestIssueIds(pr: PullRequestType): Promise<strin
6161 extractIssueNumbers ( pr . title ) . map ( ( id ) => ids . add ( id ) ) ;
6262 }
6363
64+ if ( typeof pr . head ?. ref === 'string' ) {
65+ extractIssueNumbers ( pr . head . ref ) . map ( ( id ) => ids . add ( id ) ) ;
66+ }
67+
6468 return [ ...ids ] ;
6569}
6670
Original file line number Diff line number Diff line change 1- const ISSUE_PATTERN_RE = / (?< ! [ a - z A - Z 0 - 9 ] ) [ A - Z ] [ A - Z 0 - 9 ] { 1 , } - \d + (? ! [ a - z A - Z 0 - 9 ] ) / g ;
1+ const ISSUE_PATTERN_RE = / (?< ! [ a - z A - Z 0 - 9 ] ) [ A - Z ] [ A - Z 0 - 9 ] { 1 , } - \d + (? ! [ a - z A - Z 0 - 9 ] ) / gi ;
22
33export function extractIssueNumbers ( string : string ) : string [ ] {
44 const result : Set < string > = new Set ( ) ;
5- string . match ( ISSUE_PATTERN_RE ) ?. forEach ( ( issue ) => result . add ( issue ) ) ;
5+ string . match ( ISSUE_PATTERN_RE ) ?. forEach ( ( issue ) => result . add ( issue . toUpperCase ( ) ) ) ;
66 return [ ...result ] ;
77}
You can’t perform that action at this time.
0 commit comments