Skip to content

Commit 6d97ff1

Browse files
fix isGlobalIssueList & isGlobalPRList 🤦‍♂️
1 parent 928344d commit 6d97ff1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ TEST: addTests('isGist', [
183183
'https://gist.my-little-hub.com/in-fragrante',
184184
]);
185185

186-
export const isGlobalIssueList = (url: URL | HTMLAnchorElement | Location = location): boolean => getCleanPathname(url) === 'issues';
186+
export const isGlobalIssueList = (url: URL | HTMLAnchorElement | Location = location): boolean => /^issues($|\/)/.test(getCleanPathname(url));
187187
TEST: addTests('isGlobalIssueList', [
188188
'https://github.com/issues',
189189
'https://github.com/issues/assigned',
@@ -192,7 +192,7 @@ TEST: addTests('isGlobalIssueList', [
192192
'https://github.com//issues/',
193193
]);
194194

195-
export const isGlobalPRList = (url: URL | HTMLAnchorElement | Location = location): boolean => getCleanPathname(url) === 'pulls';
195+
export const isGlobalPRList = (url: URL | HTMLAnchorElement | Location = location): boolean => /^pulls($|\/)/.test(getCleanPathname(url));
196196
TEST: addTests('isGlobalPRList', [
197197
'https://github.com/pulls',
198198
'https://github.com/pulls/assigned',

0 commit comments

Comments
 (0)