mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 09:28:06 +00:00
misc: minor renames
This commit is contained in:
@@ -7,7 +7,7 @@ import { request } from "@app/lib/config/request";
|
|||||||
import { BadRequestError, ForbiddenRequestError, InternalServerError } from "@app/lib/errors";
|
import { BadRequestError, ForbiddenRequestError, InternalServerError } from "@app/lib/errors";
|
||||||
import { getAppConnectionMethodName } from "@app/services/app-connection/app-connection-fns";
|
import { getAppConnectionMethodName } from "@app/services/app-connection/app-connection-fns";
|
||||||
import { IntegrationUrls } from "@app/services/integration-auth/integration-list";
|
import { IntegrationUrls } from "@app/services/integration-auth/integration-list";
|
||||||
import { getSyncedAdminIntegrationsConfig } from "@app/services/super-admin/super-admin-service";
|
import { getInstanceIntegrationsConfig } from "@app/services/super-admin/super-admin-service";
|
||||||
|
|
||||||
import { AppConnection } from "../app-connection-enums";
|
import { AppConnection } from "../app-connection-enums";
|
||||||
import { GitHubConnectionMethod } from "./github-connection-enums";
|
import { GitHubConnectionMethod } from "./github-connection-enums";
|
||||||
@@ -15,7 +15,7 @@ import { TGitHubConnection, TGitHubConnectionConfig } from "./github-connection-
|
|||||||
|
|
||||||
export const getGitHubConnectionListItem = () => {
|
export const getGitHubConnectionListItem = () => {
|
||||||
const { INF_APP_CONNECTION_GITHUB_OAUTH_CLIENT_ID, INF_APP_CONNECTION_GITHUB_APP_SLUG } = getConfig();
|
const { INF_APP_CONNECTION_GITHUB_OAUTH_CLIENT_ID, INF_APP_CONNECTION_GITHUB_APP_SLUG } = getConfig();
|
||||||
const { gitHubAppConnection } = getSyncedAdminIntegrationsConfig();
|
const { gitHubAppConnection } = getInstanceIntegrationsConfig();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
name: "GitHub" as const,
|
name: "GitHub" as const,
|
||||||
@@ -32,7 +32,7 @@ export const getGitHubClient = (appConnection: TGitHubConnection) => {
|
|||||||
const { method, credentials } = appConnection;
|
const { method, credentials } = appConnection;
|
||||||
|
|
||||||
let client: Octokit;
|
let client: Octokit;
|
||||||
const { gitHubAppConnection } = getSyncedAdminIntegrationsConfig();
|
const { gitHubAppConnection } = getInstanceIntegrationsConfig();
|
||||||
|
|
||||||
const appId = gitHubAppConnection.appId || appCfg.INF_APP_CONNECTION_GITHUB_APP_ID;
|
const appId = gitHubAppConnection.appId || appCfg.INF_APP_CONNECTION_GITHUB_APP_ID;
|
||||||
const appPrivateKey = gitHubAppConnection.privateKey || appCfg.INF_APP_CONNECTION_GITHUB_APP_PRIVATE_KEY;
|
const appPrivateKey = gitHubAppConnection.privateKey || appCfg.INF_APP_CONNECTION_GITHUB_APP_PRIVATE_KEY;
|
||||||
@@ -157,7 +157,7 @@ type TokenRespData = {
|
|||||||
export const validateGitHubConnectionCredentials = async (config: TGitHubConnectionConfig) => {
|
export const validateGitHubConnectionCredentials = async (config: TGitHubConnectionConfig) => {
|
||||||
const { credentials, method } = config;
|
const { credentials, method } = config;
|
||||||
|
|
||||||
const { gitHubAppConnection } = getSyncedAdminIntegrationsConfig();
|
const { gitHubAppConnection } = getInstanceIntegrationsConfig();
|
||||||
|
|
||||||
const {
|
const {
|
||||||
INF_APP_CONNECTION_GITHUB_OAUTH_CLIENT_ID,
|
INF_APP_CONNECTION_GITHUB_OAUTH_CLIENT_ID,
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ let adminIntegrationsConfig: TAdminIntegrationConfig = {
|
|||||||
|
|
||||||
Object.freeze(adminIntegrationsConfig);
|
Object.freeze(adminIntegrationsConfig);
|
||||||
|
|
||||||
export const getSyncedAdminIntegrationsConfig = () => {
|
export const getInstanceIntegrationsConfig = () => {
|
||||||
return adminIntegrationsConfig;
|
return adminIntegrationsConfig;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -111,10 +111,10 @@ export const GitHubConnectionForm = ({ appConnection }: Props) => {
|
|||||||
}. This field cannot be changed after creation.`}
|
}. This field cannot be changed after creation.`}
|
||||||
errorText={
|
errorText={
|
||||||
!isLoading && isMissingConfig
|
!isLoading && isMissingConfig
|
||||||
? `Environment variables have not been configured. ${
|
? `Credentials have not been configured. ${
|
||||||
isInfisicalCloud()
|
isInfisicalCloud()
|
||||||
? "Please contact Infisical."
|
? "Please contact Infisical."
|
||||||
: `See Docs to configure GitHub ${methodDetails.name} Connections.`
|
: `See Docs to configure Github ${methodDetails.name} Connections.`
|
||||||
}`
|
}`
|
||||||
: error?.message
|
: error?.message
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user