mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 18:27:19 +00:00
Frontend tweak
This commit is contained in:
+6
-4
@@ -46,9 +46,11 @@ type Props = {
|
|||||||
const formSchema = genericAppConnectionFieldsSchema.extend({
|
const formSchema = genericAppConnectionFieldsSchema.extend({
|
||||||
app: z.literal(AppConnection.GitHub),
|
app: z.literal(AppConnection.GitHub),
|
||||||
method: z.nativeEnum(GitHubConnectionMethod),
|
method: z.nativeEnum(GitHubConnectionMethod),
|
||||||
credentials: z.object({
|
credentials: z
|
||||||
host: z.string().optional()
|
.object({
|
||||||
})
|
host: z.string().optional()
|
||||||
|
})
|
||||||
|
.optional()
|
||||||
});
|
});
|
||||||
|
|
||||||
type FormData = z.infer<typeof formSchema>;
|
type FormData = z.infer<typeof formSchema>;
|
||||||
@@ -92,7 +94,7 @@ export const GitHubConnectionForm = ({ appConnection }: Props) => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const githubHost =
|
const githubHost =
|
||||||
formData.credentials.host && formData.credentials.host.length > 0
|
formData.credentials?.host && formData.credentials.host.length > 0
|
||||||
? `https://${formData.credentials.host}`
|
? `https://${formData.credentials.host}`
|
||||||
: "https://github.com";
|
: "https://github.com";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user