Skip to content

Commit 753c5c9

Browse files
committed
isRepoIssueList - Exclude :user/:repo/issues/views
1 parent 42ca5e7 commit 753c5c9

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎index.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,7 @@ TEST: addTests('isRepo', [
500500
'https://github.com/sindresorhus/refined-github/milestones/1/edit', // Gotcha for isRepoTaxonomyIssueOrPRList
501501
'https://github.com/sindresorhus/refined-github/issues/new/choose', // Gotcha for isRepoIssueList
502502
'https://github.com/sindresorhus/refined-github/issues/templates/edit', // Gotcha for isRepoIssueList
503+
'https://github.com/refined-github/refined-github/issues/views', // Gotcha for isRepoIssueList
503504
]);
504505

505506
export const hasRepoHeader = (url: URL | HTMLAnchorElement | Location = location): boolean => isRepo(url) && !isRepoSearch(url);
@@ -546,8 +547,8 @@ TEST: addTests('isRepoPRList', [
546547
]);
547548

548549
export const isRepoIssueList = (url: URL | HTMLAnchorElement | Location = location): boolean =>
549-
// `issues/fregante` is a list but `issues/1`, `issues/new`, `issues/new/choose`, `issues/templates/edit` aren’t
550-
/^labels\/|^issues(?!\/(\d+|new|templates)($|\/))/.test(getRepo(url)?.path);
550+
// `issues/fregante` and `issues/views/123` are lists but `issues/1`, `issues/new`, `issues/new/choose`, `issues/templates/edit`, `issues/views` aren’t
551+
/^labels\/|^issues(?!\/(\d+|new|templates|views$)($|\/))/.test(getRepo(url)?.path);
551552
TEST: addTests('isRepoIssueList', [
552553
'http://github.com/sindresorhus/ava/issues',
553554
'https://github.com/sindresorhus/refined-github/issues',

0 commit comments

Comments
 (0)