Skip to content

Commit

Permalink
chore: Read Gitlab server URL from env for prime integrations (#9910)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dschoordsch authored Jul 2, 2024
1 parent 3f2ca48 commit 830235d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ RETHINKDB_SSL='false'
# GITHUB_CLIENT_SECRET='key_GITHUB_CLIENT_SECRET'
# GITLAB_CLIENT_ID='key_GITLAB_CLIENT_ID'
# GITLAB_CLIENT_SECRET='key_GITLAB_CLIENT_SECRET'
# GITLAB_SERVER_URL='https://gitlab.com'
# HUBSPOT_API_KEY=''
# HUBSPOT_SALES_PIPELINE_ACTIVE_STAGES=''
# HUBSPOT_SALES_PIPELINE_ID=''
Expand Down
4 changes: 2 additions & 2 deletions scripts/toolboxSrc/primeIntegrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const upsertGlobalIntegrationProvidersFromEnv = async () => {
authStrategy: 'oauth2',
scope: 'global',
teamId: 'aGhostTeam',
serverBaseUrl: 'https://gitlab.com',
serverBaseUrl: process.env.GITLAB_SERVER_URL,
clientId: process.env.GITLAB_CLIENT_ID,
clientSecret: process.env.GITLAB_CLIENT_SECRET
},
Expand All @@ -34,7 +34,7 @@ const upsertGlobalIntegrationProvidersFromEnv = async () => {
}
] as const

const validProviders = providers.filter(({clientId, clientSecret}) => clientId && clientSecret)
const validProviders = providers.filter(({clientId, clientSecret, serverBaseUrl}) => clientId && clientSecret && serverBaseUrl)
await Promise.all(
validProviders.map((provider) => {
return upsertIntegrationProvider(provider)
Expand Down

0 comments on commit 830235d

Please sign in to comment.