feat(secret-sync): Add Azure Devops PR suggestions

This commit is contained in:
carlosmonastyrski
2025-06-06 10:08:31 -03:00
parent d9bc4da6f1
commit bf72638600
11 changed files with 14 additions and 21 deletions

View File

@@ -70,7 +70,7 @@ const listAzureDevOpsProjects = async (
// Use the standard Azure DevOps Projects API endpoint
// This endpoint returns only projects that the authenticated user has access to
const devOpsEndpoint = `${IntegrationUrls.AZURE_DEVOPS_API_URL}/${orgName}/_apis/projects?api-version=7.1`;
const devOpsEndpoint = `${IntegrationUrls.AZURE_DEVOPS_API_URL}/${encodeURIComponent(orgName)}/_apis/projects?api-version=7.1`;
try {
const { data } = await request.get<TAzureDevOpsProjectsResponse>(devOpsEndpoint, {
headers: getAuthHeaders(appConnection, accessToken)

View File

@@ -52,11 +52,3 @@ export interface TAzureListRegisteredAppsResponse {
"@odata.nextLink"?: string;
value: TAzureRegisteredApp[];
}
export interface TAzureDevOps {
keyId: string;
displayName?: string;
startDateTime: string;
endDateTime: string;
secretText?: string;
}

View File

@@ -68,7 +68,7 @@ export const azureDevOpsSyncFactory = ({ kmsService, appConnectionDAL }: TAzureD
environmentName: string,
isOAuth: boolean
) => {
const url = `${IntegrationUrls.AZURE_DEVOPS_API_URL}/${orgName}/${projectId}/_apis/distributedtask/variablegroups?api-version=7.1`;
const url = `${IntegrationUrls.AZURE_DEVOPS_API_URL}/${encodeURIComponent(orgName)}/${encodeURIComponent(projectId)}/_apis/distributedtask/variablegroups?api-version=7.1`;
const response = await request.get<AzureDevOpsVariableGroupList>(url, {
headers: {
Authorization: getAuthHeader(accessToken, isOAuth)

View File

@@ -103,7 +103,7 @@ Infisical currently supports two methods for connecting to Azure DevOps, which a
<Tab title="Infisical UI">
<Steps>
<Step title="Fill in Connection Details">
Fill in the **Tenant ID** field with the Directory (Tenant) ID you obtained in the previous step. And the organization name of the Azure DevOps organization you want to connect to.
Fill in the **Tenant ID** field with the Directory (Tenant) ID you obtained in the previous step. Also fill in the organization name of the Azure DevOps organization you want to connect to.
![Fill in Connection Details](/images/app-connections/azure/devops/fill-in-connection-details-oauth.png)
<Tip>
@@ -132,6 +132,6 @@ Infisical currently supports two methods for connecting to Azure DevOps, which a
</Tabs>
</Step>
<Step title="Connection Created">
Your **Azure Client Secrets Connection** is now available for use. ![Azure Client Secrets](/images/app-connections/azure/devops/devops-connection.png)
Your **Azure DevOps Connection** is now available for use. ![Azure DevOps](/images/app-connections/azure/devops/devops-connection.png)
</Step>
</Steps>

View File

@@ -5,8 +5,8 @@ description: "Learn how to configure a Azure DevOps Sync for Infisical."
**Prerequisites:**
- Set up and add secrets to [Infisical Cloud](https://app.infisical.com)
- Create an [Azure DevOps Connection](/integrations/app-connections/azure-devops)
- Set up and add secrets to [Infisical Cloud](https://app.infisical.com)
- Create an [Azure DevOps Connection](/integrations/app-connections/azure-devops)
<Tabs>
<Tab title="Infisical UI">
@@ -31,7 +31,7 @@ description: "Learn how to configure a Azure DevOps Sync for Infisical."
- **Azure DevOps Connection**: The Azure DevOps Connection to authenticate with.
- **Project**: The Azure DevOps project to deploy secrets to.
<p class="height:1px" />
<p class="height:1px"/>
5. Configure the **Sync Options** to specify how secrets should be synced, then click **Next**.
![Configure Options](/images/secret-syncs/azure-devops/devops-options.png)
@@ -92,7 +92,7 @@ description: "Learn how to configure a Azure DevOps Sync for Infisical."
{
"secretSync": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "my-key-vault-sync",
"name": "my-devops-sync",
"description": "an example sync",
"isEnabled": true,
"version": 1,
@@ -114,7 +114,7 @@ description: "Learn how to configure a Azure DevOps Sync for Infisical."
"lastRemovedAt": null,
"syncOptions": {
"initialSyncBehavior": "overwrite-destination",
"keySchema": "PIPELINE_${key}",
"keySchema": "PIPELINE_${secretKey}",
"disableSecretDeletion": true
},
"connection": {

View File

@@ -7,7 +7,7 @@ import { OnePassSyncFields } from "./1PasswordSyncFields";
import { AwsParameterStoreSyncFields } from "./AwsParameterStoreSyncFields";
import { AwsSecretsManagerSyncFields } from "./AwsSecretsManagerSyncFields";
import { AzureAppConfigurationSyncFields } from "./AzureAppConfigurationSyncFields";
import { AzureDevOpsSyncFields } from "./AzureDevopsSyncFields";
import { AzureDevOpsSyncFields } from "./AzureDevOpsSyncFields";
import { AzureKeyVaultSyncFields } from "./AzureKeyVaultSyncFields";
import { CamundaSyncFields } from "./CamundaSyncFields";
import { DatabricksSyncFields } from "./DatabricksSyncFields";

View File

@@ -16,7 +16,7 @@ import {
AwsSecretsManagerSyncReviewFields
} from "./AwsSecretsManagerSyncReviewFields";
import { AzureAppConfigurationSyncReviewFields } from "./AzureAppConfigurationSyncReviewFields";
import { AzureDevOpsSyncReviewFields } from "./AzureDevopsSyncReviewFields";
import { AzureDevOpsSyncReviewFields } from "./AzureDevOpsSyncReviewFields";
import { AzureKeyVaultSyncReviewFields } from "./AzureKeyVaultSyncReviewFields";
import { CamundaSyncReviewFields } from "./CamundaSyncReviewFields";
import { DatabricksSyncReviewFields } from "./DatabricksSyncReviewFields";

View File

@@ -4,7 +4,7 @@ import { OnePassSyncDestinationCol } from "./1PasswordSyncDestinationCol";
import { AwsParameterStoreSyncDestinationCol } from "./AwsParameterStoreSyncDestinationCol";
import { AwsSecretsManagerSyncDestinationCol } from "./AwsSecretsManagerSyncDestinationCol";
import { AzureAppConfigurationDestinationSyncCol } from "./AzureAppConfigurationDestinationSyncCol";
import { AzureDevOpsSyncDestinationCol } from "./AzureDevopsDestinationCol";
import { AzureDevOpsSyncDestinationCol } from "./AzureDevOpsSyncDestinationCol";
import { AzureKeyVaultDestinationSyncCol } from "./AzureKeyVaultDestinationSyncCol";
import { CamundaSyncDestinationCol } from "./CamundaSyncDestinationCol";
import { DatabricksSyncDestinationCol } from "./DatabricksSyncDestinationCol";

View File

@@ -112,6 +112,7 @@ export const getSecretSyncDestinationColValues = (secretSync: TSecretSync) => {
break;
case SecretSync.AzureDevOps:
primaryText = destinationConfig.devopsProjectName;
secondaryText = destinationConfig.devopsProjectId;
break;
default:
throw new Error(`Unhandled Destination Col Values ${destination}`);

View File

@@ -14,7 +14,7 @@ import { OnePassSyncDestinationSection } from "./1PasswordSyncDestinationSection
import { AwsParameterStoreSyncDestinationSection } from "./AwsParameterStoreSyncDestinationSection";
import { AwsSecretsManagerSyncDestinationSection } from "./AwsSecretsManagerSyncDestinationSection";
import { AzureAppConfigurationSyncDestinationSection } from "./AzureAppConfigurationSyncDestinationSection";
import { AzureDevOpsSyncDestinationSection } from "./AzureDevopsSyncDestinationSection";
import { AzureDevOpsSyncDestinationSection } from "./AzureDevOpsSyncDestinationSection";
import { AzureKeyVaultSyncDestinationSection } from "./AzureKeyVaultSyncDestinationSection";
import { CamundaSyncDestinationSection } from "./CamundaSyncDestinationSection";
import { DatabricksSyncDestinationSection } from "./DatabricksSyncDestinationSection";