@@ -253,14 +253,31 @@ export const isOpenPR = (): boolean => exists('#partial-discussion-header [title
253253export const isMergedPR = ( ) : boolean => exists ( '#partial-discussion-header [title="Status: Merged"]' ) ;
254254export const isClosedPR = ( ) : boolean => exists ( '#partial-discussion-header [title="Status: Closed"], #partial-discussion-header [title="Status: Merged"]' ) ;
255255
256- export const isReleasesOrTags = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => / ^ t a g s $ | ^ r e l e a s e s ( $ | \/ t a g ) / . test ( getRepo ( url ) ?. path ! ) ;
257- collect . set ( 'isReleasesOrTags ' , [
256+ export const isReleases = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => getRepo ( url ) ?. path === 'releases' ;
257+ collect . set ( 'isReleases ' , [
258258 'https://github.com/sindresorhus/refined-github/releases' ,
259+ 'https://github.com/sindresorhus/refined-github/releases?page=2' ,
260+ ] ) ;
261+
262+ export const isTags = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => getRepo ( url ) ?. path === 'tags' ;
263+ collect . set ( 'isTags' , [
259264 'https://github.com/sindresorhus/refined-github/tags' ,
265+ 'https://github.com/sindresorhus/refined-github/tags?after=21.8.1' ,
266+ ] ) ;
267+
268+ export const isSingleTag = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => / ^ ( r e l e a s e s \/ t a g ) / . test ( getRepo ( url ) ?. path ! ) ;
269+ collect . set ( 'isSingleTag' , [
260270 'https://github.com/sindresorhus/refined-github/releases/tag/v1.0.0-beta.4' ,
261271 'https://github.com/sindresorhus/refined-github/releases/tag/0.2.1' ,
262272] ) ;
263273
274+ export const isReleasesOrTags = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => isReleases ( url ) || isTags ( url ) || isSingleTag ( url ) ;
275+ collect . set ( 'isReleasesOrTags' , [
276+ ...collect . get ( 'isReleases' ) as string [ ] ,
277+ ...collect . get ( 'isTags' ) as string [ ] ,
278+ ...collect . get ( 'isSingleTag' ) as string [ ] ,
279+ ] ) ;
280+
264281export const isDeletingFile = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => Boolean ( getRepo ( url ) ?. path . startsWith ( 'delete' ) ) ;
265282collect . set ( 'isDeletingFile' , [
266283 'https://github.com/sindresorhus/refined-github/delete/master/readme.md' ,
@@ -540,12 +557,6 @@ collect.set('isUserProfileFollowingTab', [
540557 'https://github.com/sindresorhus?tab=following' ,
541558] ) ;
542559
543- export const isSingleTag = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => / ^ ( r e l e a s e s \/ t a g ) / . test ( getRepo ( url ) ?. path ! ) ;
544- collect . set ( 'isSingleTag' , [
545- 'https://github.com/sindresorhus/refined-github/releases/tag/v1.0.0-beta.4' ,
546- 'https://github.com/sindresorhus/refined-github/releases/tag/0.2.1' ,
547- ] ) ;
548-
549560collect . set ( 'hasComments' , combinedTestOnly ) ;
550561export const hasComments = ( url : URL | HTMLAnchorElement | Location = location ) : boolean =>
551562 isPR ( url )
0 commit comments