- Add a max iteration to loop - Hide gateways on frontend if license

does not allow them - Fix capitalization issue with GitHub secret sync
This commit is contained in:
x032205
2025-07-24 22:25:23 -04:00
parent e34deb7bd0
commit 0f06c4c27a
7 changed files with 296 additions and 266 deletions
@@ -171,9 +171,11 @@ const putSecret = async (
export const GithubSyncFns = {
syncSecrets: async (
secretSync: TGitHubSyncWithCredentials,
secretMap: TSecretMap,
ogSecretMap: TSecretMap,
gatewayService: Pick<TGatewayServiceFactory, "fnGetGatewayClientTlsByGatewayId">
) => {
const secretMap = Object.fromEntries(Object.entries(ogSecretMap).map(([i, v]) => [i.toUpperCase(), v]));
switch (secretSync.destinationConfig.scope) {
case GitHubSyncScope.Organization:
if (Object.values(secretMap).length > 1000) {
@@ -252,9 +254,11 @@ export const GithubSyncFns = {
},
removeSecrets: async (
secretSync: TGitHubSyncWithCredentials,
secretMap: TSecretMap,
ogSecretMap: TSecretMap,
gatewayService: Pick<TGatewayServiceFactory, "fnGetGatewayClientTlsByGatewayId">
) => {
const secretMap = Object.fromEntries(Object.entries(ogSecretMap).map(([i, v]) => [i.toUpperCase(), v]));
const { connection } = secretSync;
const token =
connection.method === GitHubConnectionMethod.OAuth