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', [
315
315
'https://github.com/sindresorhus/refined-github/tree/57bf435ee12d14b482df0bbd88013a2814c7512e/distribution' ,
316
316
] ) ;
317
317
318
- export const isRepoWithAccess = ( ) : boolean => isRepo ( ) && exists ( '.reponav-item[href$="/settings"]' ) ;
319
-
320
318
export const isSingleCommit = ( url : URL | Location = location ) : boolean => / ^ c o m m i t \/ [ \d a - f ] { 5 , 40 } / . test ( getRepoPath ( url ) ! ) ;
321
319
collect . set ( 'isSingleCommit' , [
322
320
'https://github.com/sindresorhus/refined-github/commit/5b614b9035f2035b839f48b4db7bd5c3298d526f' ,
@@ -400,6 +398,13 @@ collect.set('isActionJobRun', [
400
398
'https://github.com/sindresorhus/refined-github/runs/639481849' ,
401
399
] ) ;
402
400
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
+
403
408
const getUsername = ( ) => document . querySelector ( 'meta[name="user-login"]' ) ! . getAttribute ( 'content' ) ! ;
404
409
405
410
// Drops leading and trailing slash to avoid /\/?/ everywhere
You can’t perform that action at this time.
0 commit comments