File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 1
1
import reservedNames from 'github-reserved-names/reserved-names.json' ;
2
2
import collect from './collector.js' ;
3
3
4
- const exists = ( selector : string ) => Boolean ( document . querySelector ( selector ) ) ;
4
+ const $ = ( selector : string ) => document . querySelector ( selector ) ;
5
+ const exists = ( selector : string ) => Boolean ( $ ( selector ) ) ;
5
6
6
7
const combinedTestOnly = 'combinedTestOnly' ; // To be used only to skip tests of combined functions, i.e. isPageA() || isPageB()
7
8
@@ -349,6 +350,8 @@ export const isEmptyRepoRoot = (): boolean => isRepoHome() && !exists('link[rel=
349
350
350
351
export const isEmptyRepo = ( ) : boolean => exists ( '[aria-label="Cannot fork because repository is empty."]' ) ;
351
352
353
+ export const isArchivedRepo = ( ) : boolean => Boolean ( isRepo ( ) && $ ( '#repository-container-header .Label' ) ! . textContent ! . endsWith ( 'archive' ) ) ;
354
+
352
355
export const isBlank = ( ) : boolean => exists ( 'main .blankslate' ) ;
353
356
354
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 ! ) ;
You can’t perform that action at this time.
0 commit comments