Skip to content

Commit 4b5ed77

Browse files
isPRFiles - Handle new URL format
1 parent f4cf13a commit 4b5ed77

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,12 +276,16 @@ TEST: addTests('isPRCommitList', [
276276
'https://github.com/sindresorhus/refined-github/pull/148/commits',
277277
]);
278278

279-
export const isPRFiles = (url: URL | HTMLAnchorElement | Location = location): boolean => /^pull\/\d+\/files/.test(getRepo(url)?.path) || isPRCommit(url);
279+
export const isPRFiles = (url: URL | HTMLAnchorElement | Location = location): boolean => /^pull\/\d+\/(files|changes)/.test(getRepo(url)?.path) || isPRCommit(url);
280280
TEST: addTests('isPRFiles', [
281281
'isPRCommit', // File contents but lacks "Viewed" checkbox, has commit information
282282
'https://github.com/sindresorhus/refined-github/pull/148/files',
283283
'https://github.com/sindresorhus/refined-github/pull/148/files/e1aba6f', // This means "every commit until e1aba6f"
284284
'https://github.com/sindresorhus/refined-github/pull/148/files/1e27d799..e1aba6f', // This means specifically "Between commit A and B"
285+
// Since December 2025
286+
'https://github.com/refined-github/refined-github/pull/148/changes',
287+
'https://github.com/refined-github/refined-github/pull/148/changes/e1aba6f', // This means "every commit until e1aba6f"
288+
'https://github.com/refined-github/refined-github/pull/148/changes/1e27d799..e1aba6f', // This means specifically "Between commit A and B"
285289
]);
286290

287291
export const isQuickPR = (url: URL | HTMLAnchorElement | Location = location): boolean => isCompare(url) && /[?&]quick_pull=1(&|$)/.test(url.search);

0 commit comments

Comments
 (0)