From a3962005408d528649128f75c8fa8281a275ab4e Mon Sep 17 00:00:00 2001 From: Justin Dalrymple Date: Thu, 8 Jun 2023 15:55:22 -0400 Subject: [PATCH] Update protected branch types (#3302) --- packages/core/src/resources/ProtectedBranches.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/core/src/resources/ProtectedBranches.ts b/packages/core/src/resources/ProtectedBranches.ts index a08a9c48..4f0e934c 100644 --- a/packages/core/src/resources/ProtectedBranches.ts +++ b/packages/core/src/resources/ProtectedBranches.ts @@ -8,8 +8,9 @@ import type { Sudo, } from '../infrastructure'; -export interface ProtectedBranchAccessLevel { - access_level: 0 | 30 | 40 | 60; +export type ProtectedBranchAccessLevel = 0 | 30 | 40 | 60; +export interface ExtendedProtectedBranchAccessLevel { + access_level: ProtectedBranchAccessLevel; access_level_description: string; user_id?: number; group_id?: number; @@ -18,9 +19,9 @@ export interface ProtectedBranchAccessLevel { export interface ProtectedBranchSchema extends Record { id: number; name: string; - push_access_levels?: ProtectedBranchAccessLevel[]; - merge_access_levels?: ProtectedBranchAccessLevel[]; - unprotect_access_levels?: ProtectedBranchAccessLevel[]; + push_access_levels?: ExtendedProtectedBranchAccessLevel[]; + merge_access_levels?: ExtendedProtectedBranchAccessLevel[]; + unprotect_access_levels?: ExtendedProtectedBranchAccessLevel[]; allow_force_push: boolean; code_owner_approval_required: boolean; }