@@ -99,8 +99,8 @@ addTests('isGist', [
99
99
'https://gist.github.com/kidonng/0d16c7f17045f486751fad1b602204a0/revisions' ,
100
100
] ) ;
101
101
102
- export const isGlobalConversationList = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => [ 'issues' , 'pulls' ] . includes ( url . pathname . split ( '/' , 2 ) [ 1 ] ! ) ;
103
- addTests ( 'isGlobalConversationList ' , [
102
+ export const isGlobalIssueOrPRList = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => [ 'issues' , 'pulls' ] . includes ( url . pathname . split ( '/' , 2 ) [ 1 ] ! ) ;
103
+ addTests ( 'isGlobalIssueOrPRList ' , [
104
104
'https://github.com/issues' ,
105
105
'https://github.com/issues?q=is%3Apr+is%3Aopen' ,
106
106
'https://github.com/issues/assigned' ,
@@ -122,11 +122,11 @@ addTests('isIssue', [
122
122
'https://github.com/sindresorhus/refined-github/issues/146' ,
123
123
] ) ;
124
124
125
- export const isConversationList = ( url : URL | HTMLAnchorElement | Location = location ) : boolean =>
126
- isGlobalConversationList ( url )
127
- || isRepoConversationList ( url )
125
+ export const isIssueOrPRList = ( url : URL | HTMLAnchorElement | Location = location ) : boolean =>
126
+ isGlobalIssueOrPRList ( url )
127
+ || isRepoIssueOrPRList ( url )
128
128
|| isMilestone ( url ) ;
129
- addTests ( 'isConversationList ' , combinedTestOnly ) ;
129
+ addTests ( 'isIssueOrPRList ' , combinedTestOnly ) ;
130
130
131
131
export const isConversation = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => isIssue ( url ) || isPRConversation ( url ) ;
132
132
addTests ( 'isConversation' , combinedTestOnly ) ;
@@ -222,7 +222,7 @@ addTests('isPRConflicts', [
222
222
'https://github.com/sindresorhus/refined-github/pull/148/conflicts' ,
223
223
] ) ;
224
224
225
- /** Any `isConversationList ` can display both issues and PRs, prefer that detection. `isPRList` only exists because this page has PR-specific filters like the "Reviews" dropdown */
225
+ /** 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 */
226
226
export const isPRList = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => url . pathname === '/pulls' || getRepo ( url ) ?. path === 'pulls' ;
227
227
addTests ( 'isPRList' , [
228
228
'https://github.com/pulls' ,
@@ -339,8 +339,8 @@ addTests('isRepo', [
339
339
'https://github.com/sindresorhus/refined-github/issues/146' ,
340
340
'https://github.com/sindresorhus/notifications/' ,
341
341
'https://github.com/sindresorhus/refined-github/pull/148' ,
342
- 'https://github.com/sindresorhus/refined-github/milestones/new' , // Gotcha for isRepoTaxonomyConversationList
343
- 'https://github.com/sindresorhus/refined-github/milestones/1/edit' , // Gotcha for isRepoTaxonomyConversationList
342
+ 'https://github.com/sindresorhus/refined-github/milestones/new' , // Gotcha for isRepoTaxonomyIssueOrPRList
343
+ 'https://github.com/sindresorhus/refined-github/milestones/1/edit' , // Gotcha for isRepoTaxonomyIssueOrPRList
344
344
'https://github.com/sindresorhus/refined-github/issues/new/choose' , // Gotcha for isRepoIssueList
345
345
'https://github.com/sindresorhus/refined-github/issues/templates/edit' , // Gotcha for isRepoIssueList
346
346
] ) ;
@@ -354,19 +354,19 @@ export const isArchivedRepo = (): boolean => Boolean(isRepo() && $('#repository-
354
354
355
355
export const isBlank = ( ) : boolean => exists ( 'main .blankslate' ) ;
356
356
357
- export const isRepoTaxonomyConversationList = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => / ^ l a b e l s \/ .+ | ^ m i l e s t o n e s \/ \d + (? ! \/ e d i t ) / . test ( getRepo ( url ) ?. path ! ) ;
358
- addTests ( 'isRepoTaxonomyConversationList ' , [
357
+ export const isRepoTaxonomyIssueOrPRList = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => / ^ l a b e l s \/ .+ | ^ m i l e s t o n e s \/ \d + (? ! \/ e d i t ) / . test ( getRepo ( url ) ?. path ! ) ;
358
+ addTests ( 'isRepoTaxonomyIssueOrPRList ' , [
359
359
'https://github.com/sindresorhus/refined-github/labels/bug' ,
360
360
'https://github.com/sindresorhus/refined-github/labels/implemented%20by%20github' ,
361
361
'https://github.com/sindresorhus/refined-github/labels/%3Adollar%3A%20Funded%20on%20Issuehunt' ,
362
362
'https://github.com/sindresorhus/refined-github/milestones/1' ,
363
363
] ) ;
364
364
365
- export const isRepoConversationList = ( url : URL | HTMLAnchorElement | Location = location ) : boolean =>
365
+ export const isRepoIssueOrPRList = ( url : URL | HTMLAnchorElement | Location = location ) : boolean =>
366
366
isRepoPRList ( url )
367
367
|| isRepoIssueList ( url )
368
- || isRepoTaxonomyConversationList ( url ) ;
369
- addTests ( 'isRepoConversationList ' , combinedTestOnly ) ;
368
+ || isRepoTaxonomyIssueOrPRList ( url ) ;
369
+ addTests ( 'isRepoIssueOrPRList ' , combinedTestOnly ) ;
370
370
371
371
export const isRepoPRList = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => Boolean ( getRepo ( url ) ?. path . startsWith ( 'pulls' ) ) ;
372
372
addTests ( 'isRepoPRList' , [
0 commit comments