From 5266c1f03d05ad286cbfc9e3c6ba5f8c135d8985 Mon Sep 17 00:00:00 2001 From: Joey Perrott Date: Wed, 14 Jan 2026 18:36:21 +0000 Subject: [PATCH] fix(ng-dev): remove call to check the schema of merge-mode Remove the schema check for merge mode as it requires an additional org:admin scope for the PAT that is calling the API. --- ng-dev/utils/git/repository-merge-mode.ts | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/ng-dev/utils/git/repository-merge-mode.ts b/ng-dev/utils/git/repository-merge-mode.ts index c41f4881b..d75eb6736 100644 --- a/ng-dev/utils/git/repository-merge-mode.ts +++ b/ng-dev/utils/git/repository-merge-mode.ts @@ -37,17 +37,7 @@ export async function setRepoMergeMode(value: string) { return false; } const git = await AuthenticatedGitClient.get(); - const {value_type, allowed_values} = await getRepoConfigValueDefinition( - mergeModePropertyName, - git, - ); - - if (value_type !== 'single_select') { - throw Error( - `Unable to update ${mergeModePropertyName} as its type is ${value_type}, currently the ` + - `only supported configuration type is single_select`, - ); - } + const allowed_values = ['team-only', 'caretaker-only', 'release']; if (!allowed_values!.includes(value)) { throw Error( @@ -71,12 +61,3 @@ export async function setRepoMergeMode(value: string) { return true; } - -async function getRepoConfigValueDefinition(key: string, git: AuthenticatedGitClient) { - return git.github.orgs - .customPropertiesForReposGetOrganizationDefinition({ - custom_property_name: key, - org: git.remoteConfig.owner, - }) - .then(({data}) => data); -}