Skip to content

Commit

Permalink
Merge pull request #313 from Infisical/debug-new-integrations
Browse files Browse the repository at this point in the history
Fix more encoding issues with integrations
  • Loading branch information
dangtony98 authored Feb 8, 2023
2 parents 9f74aff + 72f7d81 commit 4570c35
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
5 changes: 3 additions & 2 deletions backend/src/integrations/sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -886,8 +886,9 @@ const syncSecretsFlyio = async ({
method: 'post',
url: INTEGRATION_FLYIO_API_URL,
headers: {
'Authorization': 'Bearer ' + accessToken,
'Content-Type': 'application/json'
'Authorization': 'Bearer ' + accessToken,
'Content-Type': 'application/json',
'Accept-Encoding': 'application/json'
},
data: {
query: GetSecrets,
Expand Down
20 changes: 10 additions & 10 deletions backend/src/variables/integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,6 @@ const INTEGRATION_RENDER_API_URL = 'https://api.render.com';
const INTEGRATION_FLYIO_API_URL = 'https://api.fly.io/graphql';

const INTEGRATION_OPTIONS = [
{
name: 'Azure Key Vault',
slug: 'azure-key-vault',
image: 'Microsoft Azure.png',
isAvailable: true,
type: 'oauth',
clientId: CLIENT_ID_AZURE,
tenantId: TENANT_ID_AZURE,
docsLink: ''
},
{
name: 'Heroku',
slug: 'heroku',
Expand Down Expand Up @@ -112,6 +102,16 @@ const INTEGRATION_OPTIONS = [
clientId: '',
docsLink: ''
},
{
name: 'Azure Key Vault',
slug: 'azure-key-vault',
image: 'Microsoft Azure.png',
isAvailable: false,
type: 'oauth',
clientId: CLIENT_ID_AZURE,
tenantId: TENANT_ID_AZURE,
docsLink: ''
},
{
name: 'Google Cloud Platform',
slug: 'gcp',
Expand Down
1 change: 0 additions & 1 deletion frontend/src/pages/integrations/netlify/create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ export default function NetlifyCreateIntegrationPage() {
useEffect(() => {
// TODO: handle case where apps can be empty
if (integrationAuthApps) {
console.log(integrationAuthApps)
setTargetApp(integrationAuthApps[0].name);
}
}, [integrationAuthApps]);
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/pages/integrations/render/create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default function RenderCreateIntegrationPage() {
useEffect(() => {
// TODO: handle case where apps can be empty
if (integrationAuthApps) {
setTargetApp(integrationAuthApps[0].name);
setTargetApp(integrationAuthApps[0].name);
}
}, [integrationAuthApps]);

Expand All @@ -52,7 +52,7 @@ export default function RenderCreateIntegrationPage() {
integrationAuthId: integrationAuth?._id,
isActive: true,
app: targetApp,
appId: null,
appId: (integrationAuthApps?.find((integrationAuthApp) => integrationAuthApp.name === targetApp))?.appId ?? null,
sourceEnvironment: selectedSourceEnvironment,
targetEnvironment: null,
owner: null
Expand Down

1 comment on commit 4570c35

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage report for backend

St.
Category Percentage Covered / Total
🟡 Statements 74.12% 63/85
🔴 Branches 0% 0/5
🔴 Functions 50% 1/2
🟡 Lines 75% 63/84

Test suite run success

1 tests passing in 1 suite.

Report generated by 🧪jest coverage report action from 4570c35

Please sign in to comment.