From 69e5afe167ccb4c4856d20c06d5e72d0a8e0be04 Mon Sep 17 00:00:00 2001 From: Grigory Date: Sun, 1 Feb 2026 05:14:08 +0500 Subject: [PATCH 1/3] `isQuickPR` - Support 'expand' query parameter --- index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.ts b/index.ts index 3e9988b..9ba0c6d 100644 --- a/index.ts +++ b/index.ts @@ -288,11 +288,12 @@ TEST: addTests('isPRFiles', [ 'https://github.com/refined-github/refined-github/pull/148/changes/1e27d7998afdd3608d9fc3bf95ccf27fa5010641..e1aba6febb3fe38aafd1137cff28b536eeeabe7e', ]); -export const isQuickPR = (url: URL | HTMLAnchorElement | Location = location): boolean => isCompare(url) && /[?&]quick_pull=1(&|$)/.test(url.search); +export const isQuickPR = (url: URL | HTMLAnchorElement | Location = location): boolean => isCompare(url) && /[?&](quick_pull|expand)=1(&|$)/.test(url.search); TEST: addTests('isQuickPR', [ 'https://github.com/sindresorhus/refined-github/compare/master...branch-name?quick_pull=1', 'https://github.com/sindresorhus/refined-github/compare/branch-1...branch-2?quick_pull=1', 'https://github.com/sindresorhus/refined-github/compare/test-branch?quick_pull=1', + 'https://github.com/refined-github/sandbox/compare/default-a...fregante-patch-2?expand=1' ]); const getStateLabel = (): string | undefined => $([ From 329cc0e50f17091760d20b297213b5d372e9b1f2 Mon Sep 17 00:00:00 2001 From: Grigory Date: Sun, 1 Feb 2026 05:16:40 +0500 Subject: [PATCH 2/3] comma --- index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.ts b/index.ts index 9ba0c6d..054348b 100644 --- a/index.ts +++ b/index.ts @@ -293,7 +293,7 @@ TEST: addTests('isQuickPR', [ 'https://github.com/sindresorhus/refined-github/compare/master...branch-name?quick_pull=1', 'https://github.com/sindresorhus/refined-github/compare/branch-1...branch-2?quick_pull=1', 'https://github.com/sindresorhus/refined-github/compare/test-branch?quick_pull=1', - 'https://github.com/refined-github/sandbox/compare/default-a...fregante-patch-2?expand=1' + 'https://github.com/refined-github/sandbox/compare/default-a...fregante-patch-2?expand=1', ]); const getStateLabel = (): string | undefined => $([ From 22d7be014a6839742166234b49fbbc77e907349b Mon Sep 17 00:00:00 2001 From: Grigory Date: Sun, 1 Feb 2026 05:24:27 +0500 Subject: [PATCH 3/3] Update test cases for `isCompare` and `isQuickPR` --- index.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/index.ts b/index.ts index 054348b..46417da 100644 --- a/index.ts +++ b/index.ts @@ -52,9 +52,7 @@ TEST: addTests('isCompare', [ 'https://github.com/sindresorhus/refined-github/compare', 'https://github.com/sindresorhus/refined-github/compare/', 'https://github.com/sindresorhus/refined-github/compare/master...branch-name', - 'https://github.com/sindresorhus/refined-github/compare/master...branch-name?quick_pull=1', - 'https://github.com/sindresorhus/refined-github/compare/branch-1...branch-2?quick_pull=1', - 'https://github.com/sindresorhus/refined-github/compare/test-branch?quick_pull=1', + 'isQuickPR', ]); export const isCompareWikiPage = (url: URL | HTMLAnchorElement | Location = location): boolean => isRepoWiki(url) && getCleanPathname(url).split('/').slice(3, 5).includes('_compare'); @@ -293,6 +291,7 @@ TEST: addTests('isQuickPR', [ 'https://github.com/sindresorhus/refined-github/compare/master...branch-name?quick_pull=1', 'https://github.com/sindresorhus/refined-github/compare/branch-1...branch-2?quick_pull=1', 'https://github.com/sindresorhus/refined-github/compare/test-branch?quick_pull=1', + 'https://github.com/refined-github/sandbox/compare/fregante-patch-2?expand=1', 'https://github.com/refined-github/sandbox/compare/default-a...fregante-patch-2?expand=1', ]);