diff --git a/backend/src/integrations/sync.ts b/backend/src/integrations/sync.ts index 9cd92af09..d0c4ed775 100644 --- a/backend/src/integrations/sync.ts +++ b/backend/src/integrations/sync.ts @@ -950,7 +950,11 @@ const syncSecretsVercel = async ({ ? { teamId: integrationAuth.teamId } - : {}) + : {}), + ...(integration?.path + ? { + gitBranch: integration?.path + } : {}) }; const vercelSecrets: VercelSecret[] = ( @@ -969,7 +973,7 @@ const syncSecretsVercel = async ({ if ( integration.targetEnvironment === "preview" && - integration.path && + secret.gitBranch && integration.path !== secret.gitBranch ) { // case: secret on preview environment does not have same target git branch @@ -978,7 +982,7 @@ const syncSecretsVercel = async ({ return true; }); - + const res: { [key: string]: VercelSecret } = {}; for await (const vercelSecret of vercelSecrets) {