Make Azure DevOps sync not require project name

This commit is contained in:
x032205
2025-07-14 21:14:57 -04:00
parent 0c0665dc51
commit 7f0f5b130a
6 changed files with 16 additions and 11 deletions
@@ -115,8 +115,10 @@ export const getSecretSyncDestinationColValues = (secretSync: TSecretSync) => {
secondaryText = "Vault ID";
break;
case SecretSync.AzureDevOps:
primaryText = destinationConfig.devopsProjectName;
secondaryText = destinationConfig.devopsProjectId;
primaryText = destinationConfig.devopsProjectName || destinationConfig.devopsProjectId;
secondaryText = destinationConfig.devopsProjectName
? destinationConfig.devopsProjectId
: "Project ID";
break;
case SecretSync.Heroku:
primaryText = destinationConfig.appName;
@@ -7,8 +7,12 @@ type Props = {
export const AzureDevOpsSyncDestinationSection = ({ secretSync }: Props) => {
const {
destinationConfig: { devopsProjectName }
destinationConfig: { devopsProjectName, devopsProjectId }
} = secretSync;
return <GenericFieldLabel label="Project">{devopsProjectName}</GenericFieldLabel>;
return (
<GenericFieldLabel label={devopsProjectName ? "Project" : "Project ID"}>
{devopsProjectName || devopsProjectId}
</GenericFieldLabel>
);
};