@@ -38,7 +38,6 @@ function exists(selector: string): boolean {
3838 * ```
3939 */
4040async function waitFor ( detection : ( ) => boolean ) : Promise < boolean > {
41- // eslint-disable-next-line no-await-in-loop -- We need to wait on each frame
4241 while ( ! detection ( ) && document . readyState !== 'complete' ) {
4342 // eslint-disable-next-line no-await-in-loop
4443 await new Promise ( resolve => {
@@ -457,11 +456,46 @@ export const isRepo = (url: URL | HTMLAnchorElement | Location = location): bool
457456} ;
458457
459458TEST: addTests ( 'isRepo' , [
460- // Some of these are here simply as "gotchas" to other detections
461- 'https://github.com/sindresorhus/refined-github/blame/master/package.json' ,
462- 'https://github.com/sindresorhus/refined-github/issues/146' ,
463- 'https://github.com/sindresorhus/notifications/' , // Gotcha for isNotifications
464- 'https://github.com/sindresorhus/refined-github/pull/148' ,
459+ 'isActionRun' , // Includes isActionJobRun URLs
460+ 'isBranches' ,
461+ 'isCompare' , // Includes isQuickPR URLs
462+ 'isDeletingFile' ,
463+ 'isEditingFile' ,
464+ 'isEditingRelease' ,
465+ 'isFileFinder' ,
466+ 'isForkingRepo' ,
467+ 'isIssue' ,
468+ 'isLabelList' ,
469+ 'isMilestone' ,
470+ 'isMilestoneList' ,
471+ 'isNewAction' ,
472+ 'isNewFile' ,
473+ 'isNewIssue' ,
474+ 'isNewRelease' ,
475+ 'isPR' , // Includes isPRConversation, isPRFiles (→isPRCommit), isPRCommitList
476+ 'isPRConflicts' ,
477+ 'isProjects' ,
478+ 'isReleases' ,
479+ 'isRepoPRList' ,
480+ 'isRepoCommitList' ,
481+ 'isRepoForksList' ,
482+ 'isRepoGitObject' , // Includes isRepoTree (→isRepoRoot→isRepoHome), isSingleFile (→isRenderedTextFile), isBlame
483+ 'isRepoIssueList' ,
484+ 'isRepoNetworkGraph' ,
485+ 'isRepoSearch' ,
486+ 'isRepoSettings' , // Includes isRepoMainSettings
487+ 'isRepoTaxonomyIssueOrPRList' ,
488+ 'isRepoWiki' , // Includes isNewWikiPage, isEditingWikiPage, isCompareWikiPage
489+ 'isRepositoryActions' ,
490+ 'isSingleCommit' ,
491+ 'isSingleReleaseOrTag' ,
492+ 'isTags' ,
493+ // Repo URLs from detections that also cover non-repo pages
494+ 'https://github.com/sindresorhus/refined-github/projects/3' , // From isProject
495+ 'https://github.com/tophf/mpiv/discussions/50' , // From isDiscussion
496+ 'https://github.com/withastro/roadmap/discussions/new?category=proposal' , // From isNewDiscussion
497+ 'https://github.com/tophf/mpiv/discussions' , // From isDiscussionList
498+ // These URLs are repos but don't match any specific detection
465499 'https://github.com/sindresorhus/refined-github/milestones/new' , // Gotcha for isRepoTaxonomyIssueOrPRList
466500 'https://github.com/sindresorhus/refined-github/milestones/1/edit' , // Gotcha for isRepoTaxonomyIssueOrPRList
467501 'https://github.com/sindresorhus/refined-github/issues/new/choose' , // Gotcha for isRepoIssueList
0 commit comments