mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 11:27:32 +00:00
Merge pull request #1017 from Infisical/debug-self-hosted-gitlab
Patch self-hosted gitlab integration
This commit is contained in:
@@ -15,6 +15,7 @@ import { IntegrationAuthMetadata } from "../models/integrationAuth/types";
|
|||||||
interface Update {
|
interface Update {
|
||||||
workspace: string;
|
workspace: string;
|
||||||
integration: string;
|
integration: string;
|
||||||
|
url?: string;
|
||||||
teamId?: string;
|
teamId?: string;
|
||||||
accountId?: string;
|
accountId?: string;
|
||||||
metadata?: IntegrationAuthMetadata
|
metadata?: IntegrationAuthMetadata
|
||||||
@@ -64,6 +65,10 @@ export const handleOAuthExchangeHelper = async ({
|
|||||||
integration
|
integration
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (res.url) {
|
||||||
|
update.url = res.url;
|
||||||
|
}
|
||||||
|
|
||||||
switch (integration) {
|
switch (integration) {
|
||||||
case INTEGRATION_VERCEL:
|
case INTEGRATION_VERCEL:
|
||||||
update.teamId = res.teamId;
|
update.teamId = res.teamId;
|
||||||
|
|||||||
@@ -423,6 +423,7 @@ const exchangeCodeGitlab = async ({
|
|||||||
accessToken: res.access_token,
|
accessToken: res.access_token,
|
||||||
refreshToken: res.refresh_token,
|
refreshToken: res.refresh_token,
|
||||||
accessExpiresAt,
|
accessExpiresAt,
|
||||||
|
url
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ export default function GitLabCreateIntegrationPage() {
|
|||||||
const selectedSourceEnvironment = watch("selectedSourceEnvironment");
|
const selectedSourceEnvironment = watch("selectedSourceEnvironment");
|
||||||
const targetEntity = watch("targetEntity");
|
const targetEntity = watch("targetEntity");
|
||||||
const targetTeamId = watch("targetTeamId");
|
const targetTeamId = watch("targetTeamId");
|
||||||
|
const targetAppIdValue = watch("targetAppId");
|
||||||
|
|
||||||
const { mutateAsync } = useCreateIntegration();
|
const { mutateAsync } = useCreateIntegration();
|
||||||
|
|
||||||
@@ -440,6 +441,7 @@ export default function GitLabCreateIntegrationPage() {
|
|||||||
size="sm"
|
size="sm"
|
||||||
type="submit"
|
type="submit"
|
||||||
isLoading={isLoading}
|
isLoading={isLoading}
|
||||||
|
isDisabled={targetAppIdValue === "none"}
|
||||||
>
|
>
|
||||||
Create Integration
|
Create Integration
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
Reference in New Issue
Block a user