Skip to content

Commit 69e5afe

Browse files
isQuickPR - Support 'expand' query parameter
1 parent 9514a4d commit 69e5afe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,11 +288,12 @@ TEST: addTests('isPRFiles', [
288288
'https://github.com/refined-github/refined-github/pull/148/changes/1e27d7998afdd3608d9fc3bf95ccf27fa5010641..e1aba6febb3fe38aafd1137cff28b536eeeabe7e',
289289
]);
290290

291-
export const isQuickPR = (url: URL | HTMLAnchorElement | Location = location): boolean => isCompare(url) && /[?&]quick_pull=1(&|$)/.test(url.search);
291+
export const isQuickPR = (url: URL | HTMLAnchorElement | Location = location): boolean => isCompare(url) && /[?&](quick_pull|expand)=1(&|$)/.test(url.search);
292292
TEST: addTests('isQuickPR', [
293293
'https://github.com/sindresorhus/refined-github/compare/master...branch-name?quick_pull=1',
294294
'https://github.com/sindresorhus/refined-github/compare/branch-1...branch-2?quick_pull=1',
295295
'https://github.com/sindresorhus/refined-github/compare/test-branch?quick_pull=1',
296+
'https://github.com/refined-github/sandbox/compare/default-a...fregante-patch-2?expand=1'
296297
]);
297298

298299
const getStateLabel = (): string | undefined => $([

0 commit comments

Comments
 (0)