review fixes

This commit is contained in:
x
2025-04-24 23:30:35 -04:00
parent 0882c181d0
commit 7c49f6e302
8 changed files with 85 additions and 55 deletions
@@ -90,9 +90,15 @@ export const TeamCitySyncFields = () => {
isOptional
label="Build Configuration"
helperText={
<span>
Not selecting a Build Configuration will sync your secrets with the entire project.
</span>
<Tooltip
className="max-w-md"
content='Ensure the configuration exists in the selected project and that your Access Token has the "View build configuration settings" permission.'
>
<div>
<span>Don&#39;t see the configuration you&#39;re looking for?</span>{" "}
<FontAwesomeIcon icon={faCircleInfo} className="text-mineshaft-400" />
</div>
</Tooltip>
}
>
<FilterableSelect
@@ -113,6 +119,10 @@ export const TeamCitySyncFields = () => {
</FormControl>
)}
/>
<span className="text-sm text-bunker-300">
Not selecting a Build Configuration will sync your secrets to the entire project.
</span>
</>
);
};
@@ -9,6 +9,6 @@ export type TTeamCityConnection = TRootAppConnection & { app: AppConnection.Team
method: TeamCityConnectionMethod.AccessToken;
credentials: {
accessToken: string;
instanceUrl?: string;
instanceUrl: string;
};
};
@@ -34,14 +34,7 @@ const formSchema = z.discriminatedUnion("method", [
method: z.literal(TeamCityConnectionMethod.AccessToken),
credentials: z.object({
accessToken: z.string().trim().min(1, "Access Token required"),
instanceUrl: z
.string()
.trim()
.transform((value) => value || undefined)
.refine((value) => (!value ? true : z.string().url().safeParse(value).success), {
message: "Invalid instance URL"
})
.optional()
instanceUrl: z.string().trim().url("Invalid Instance URL")
})
})
]);