From 753c5c962809eb0d5a5b5dffed91069e06d67ff0 Mon Sep 17 00:00:00 2001 From: Federico Date: Sun, 2 Aug 2026 15:50:36 +0800 Subject: [PATCH] `isRepoIssueList` - Exclude `:user/:repo/issues/views` --- index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.ts b/index.ts index b9a2a7e..5f7cd3f 100644 --- a/index.ts +++ b/index.ts @@ -500,6 +500,7 @@ TEST: addTests('isRepo', [ 'https://github.com/sindresorhus/refined-github/milestones/1/edit', // Gotcha for isRepoTaxonomyIssueOrPRList 'https://github.com/sindresorhus/refined-github/issues/new/choose', // Gotcha for isRepoIssueList 'https://github.com/sindresorhus/refined-github/issues/templates/edit', // Gotcha for isRepoIssueList + 'https://github.com/refined-github/refined-github/issues/views', // Gotcha for isRepoIssueList ]); export const hasRepoHeader = (url: URL | HTMLAnchorElement | Location = location): boolean => isRepo(url) && !isRepoSearch(url); @@ -546,8 +547,8 @@ TEST: addTests('isRepoPRList', [ ]); export const isRepoIssueList = (url: URL | HTMLAnchorElement | Location = location): boolean => - // `issues/fregante` is a list but `issues/1`, `issues/new`, `issues/new/choose`, `issues/templates/edit` aren’t - /^labels\/|^issues(?!\/(\d+|new|templates)($|\/))/.test(getRepo(url)?.path); + // `issues/fregante` and `issues/views/123` are lists but `issues/1`, `issues/new`, `issues/new/choose`, `issues/templates/edit`, `issues/views` aren’t + /^labels\/|^issues(?!\/(\d+|new|templates|views$)($|\/))/.test(getRepo(url)?.path); TEST: addTests('isRepoIssueList', [ 'http://github.com/sindresorhus/ava/issues', 'https://github.com/sindresorhus/refined-github/issues',