()
| 48 | }); |
| 49 | |
| 50 | export async function userIsAdmin(): Promise<boolean> { |
| 51 | const repoAccess = await viewerPermission.get(); |
| 52 | return repoAccess === 'ADMIN'; |
| 53 | } |
| 54 | |
| 55 | /** Check if the user has complete write access to the repo (but no access to the repo Settings) */ |
| 56 | export async function userHasPushAccess(): Promise<boolean> { |