File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -301,17 +301,16 @@ addTests('isTags', [
301
301
'https://github.com/sindresorhus/refined-github/tags?after=21.8.1' ,
302
302
] ) ;
303
303
304
- export const isSingleTag = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => / ^ ( r e l e a s e s \/ t a g ) / . test ( getRepo ( url ) ?. path ! ) ;
305
- addTests ( 'isSingleTag ' , [
306
- 'https://github.com/sindresorhus /refined-github/releases/tag/v1.0.0-beta.4' ,
307
- 'https://github.com/sindresorhus /refined-github/releases/tag/0.2.1' ,
304
+ export const isSingleReleaseOrTag = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => Boolean ( getRepo ( url ) ?. path ! . startsWith ( 'releases/tag' ) ) ;
305
+ addTests ( 'isSingleReleaseOrTag ' , [
306
+ 'https://github.com/refined-github /refined-github/releases/tag/1.20.1' , // Tag
307
+ 'https://github.com/refined-github /refined-github/releases/tag/23.7.25' , // Release
308
308
] ) ;
309
309
310
- export const isReleasesOrTags = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => isReleases ( url ) || isTags ( url ) || isSingleTag ( url ) ;
310
+ export const isReleasesOrTags = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => isReleases ( url ) || isTags ( url ) ;
311
311
addTests ( 'isReleasesOrTags' , [
312
312
'isReleases' ,
313
313
'isTags' ,
314
- 'isSingleTag' ,
315
314
] ) ;
316
315
317
316
export const isDeletingFile = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => Boolean ( getRepo ( url ) ?. path . startsWith ( 'delete' ) ) ;
You can’t perform that action at this time.
0 commit comments