File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -315,8 +315,6 @@ collect.set('isRepoTree', [
315315 'https://github.com/sindresorhus/refined-github/tree/57bf435ee12d14b482df0bbd88013a2814c7512e/distribution' ,
316316] ) ;
317317
318- export const isRepoWithAccess = ( ) : boolean => isRepo ( ) && exists ( '.reponav-item[href$="/settings"]' ) ;
319-
320318export const isSingleCommit = ( url : URL | Location = location ) : boolean => / ^ c o m m i t \/ [ \d a - f ] { 5 , 40 } / . test ( getRepoPath ( url ) ! ) ;
321319collect . set ( 'isSingleCommit' , [
322320 'https://github.com/sindresorhus/refined-github/commit/5b614b9035f2035b839f48b4db7bd5c3298d526f' ,
@@ -400,6 +398,13 @@ collect.set('isActionJobRun', [
400398 'https://github.com/sindresorhus/refined-github/runs/639481849' ,
401399] ) ;
402400
401+ export const canUserEditOrganization = ( ) : boolean => isOrganizationProfile ( ) && exists ( '.pagehead-tabs-item[href$="/settings/profile"]' ) ;
402+
403+ export const canUserEditRepo = ( ) : boolean => isRepo ( ) && exists ( '.reponav-item[href$="/settings"]' ) ;
404+
405+ /** @deprecated use canUserEditRepo */
406+ export const isRepoWithAccess = canUserEditRepo ;
407+
403408const getUsername = ( ) => document . querySelector ( 'meta[name="user-login"]' ) ! . getAttribute ( 'content' ) ! ;
404409
405410// Drops leading and trailing slash to avoid /\/?/ everywhere
You can’t perform that action at this time.
0 commit comments