Skip to content

isPRList - Support global PR list subpaths#245

Open
SunsetTechuila wants to merge 1 commit intomainfrom
SunsetTechuila-isPRList
Open

isPRList - Support global PR list subpaths#245
SunsetTechuila wants to merge 1 commit intomainfrom
SunsetTechuila-isPRList

Conversation

@SunsetTechuila
Copy link
Copy Markdown
Member

No description provided.

@SunsetTechuila
Copy link
Copy Markdown
Member Author

what a mess

@SunsetTechuila
Copy link
Copy Markdown
Member Author

SunsetTechuila commented Apr 14, 2026

@fregante why doesn't isPRList use isRepoPRList and isGlobalPRList?


/** 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 */
export const isPRList = (url: URL | HTMLAnchorElement | Location = location): boolean => url.pathname === '/pulls' || getRepo(url)?.path === 'pulls';
export const isPRList = (url: URL | HTMLAnchorElement | Location = location): boolean => url.pathname.startsWith('/pulls') || isRepoPRList(url);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's also add a gotcha URL: /pullsuser/my-library

@fregante
Copy link
Copy Markdown
Member

@fregante why doesn't isPRList use isRepoPRList and isGlobalPRList?

Blame it. Most likely isGlobalPRList came after

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants