Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,12 +276,16 @@ TEST: addTests('isPRCommitList', [
'https://github.com/sindresorhus/refined-github/pull/148/commits',
]);

export const isPRFiles = (url: URL | HTMLAnchorElement | Location = location): boolean => /^pull\/\d+\/files/.test(getRepo(url)?.path) || isPRCommit(url);
export const isPRFiles = (url: URL | HTMLAnchorElement | Location = location): boolean => /^pull\/\d+\/(files|changes)/.test(getRepo(url)?.path) || isPRCommit(url);
TEST: addTests('isPRFiles', [
'isPRCommit', // File contents but lacks "Viewed" checkbox, has commit information
'https://github.com/sindresorhus/refined-github/pull/148/files',
'https://github.com/sindresorhus/refined-github/pull/148/files/e1aba6f', // This means "every commit until e1aba6f"
'https://github.com/sindresorhus/refined-github/pull/148/files/1e27d799..e1aba6f', // This means specifically "Between commit A and B"
// Since December 2025
'https://github.com/refined-github/refined-github/pull/148/changes',
'https://github.com/refined-github/refined-github/pull/148/changes/e1aba6f', // This means "every commit until e1aba6f"
Comment thread
SunsetTechuila marked this conversation as resolved.
Outdated
'https://github.com/refined-github/refined-github/pull/148/changes/1e27d799..e1aba6f', // This means specifically "Between commit A and B"
]);

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