Skip to content

Commit f9a97ac

Browse files
isPRList - Support global PR list subpaths
1 parent c1e5e3f commit f9a97ac

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,11 @@ TEST: addTests('isPRConflicts', [
318318
]);
319319

320320
/** Any `isIssueOrPRList` can display both issues and PRs, prefer that detection. `isPRList` only exists because this page has PR-specific filters like the "Reviews" dropdown */
321-
export const isPRList = (url: URL | HTMLAnchorElement | Location = location): boolean => url.pathname === '/pulls' || getRepo(url)?.path === 'pulls';
321+
export const isPRList = (url: URL | HTMLAnchorElement | Location = location): boolean => url.pathname.startsWith('/pulls') || isRepoPRList(url);
322322
TEST: addTests('isPRList', [
323323
'https://github.com/pulls',
324324
'https://github.com/pulls?q=issues',
325+
'https://github.com/pulls/review-requested',
325326
'https://github.com/sindresorhus/refined-github/pulls',
326327
'https://github.com/sindresorhus/refined-github/pulls/',
327328
'https://github.com/sindresorhus/refined-github/pulls?q=is%3Aopen+is%3Apr',

0 commit comments

Comments
 (0)