Accessing source code in Azure Repos is what allows Foundational to accurately determine data lineage and analyze pending and historical pull requests.
This setup should take about 10 minutes.
On-premise agent supported
In order to configure Azure Repos, you will need the following steps:
Configure a Personal Access Token
Configure Foundational Azure Repos Connector
Configure Web Hooks
These steps are detailed below.
Step #1: Configure a Personal Access Token (PAT)
Create a Personal Access Token (PAT) in your Azure account by following the steps in this link: Create PAT.
Choose a specific organization.
One year expiration is recommended.
Choose the following scopes when configuring the PAT:
Code : Read & Write
Code : Status
Project and Team : Read
Pull Request Threads : Read & Write
User Profiles : Read
Identity : Read
Consider creating a special Azure user for Foundational: The owner of this PAT will appear as an author of all Foundational Pull Request comments.
Step #2: Configure Azure Repos Connector
Go to Foundational's Integrations page.
Click on Azure Repos.
Click Add new Azure Repos connection.
Enter Organization Name as it appears in Azure Repos UI.
Enter the Personal Access Token.
Choose a strong password and enter it under Webhook Password.
(Store it, you will need it in the future)
Click Save.
Step #3: Configure Web Hooks
The Web Hooks notify Foundational on certain events, such as new merge requests, new commits to existing merge requests, etc.
Manual configuration
Create five Web Hooks for each of the projects that you would like to integrate with Foundational by following these steps, or by running the script below.
Choose those triggers for different Web Hooks:
Code pushed
Pull request created
Pull request updated
Pull request merge attempted
Repository created
Use the this value for URL (ORG_NAME is an Organization Name as it appears in Azure Repos UI):
βhttps://hooks.foundational.io/api/v1/azure_repos_webhook?id_=ORG_NAME
Use this value for basic authentication username:
foundational-webhook
Use the Webhook Password from above for basic authentication password
Scripted configuration
If you would like to automate Web Hooks creation, please use this script and substitute the values in double curly braces:
The executing user must be in
Project Collection Administrators
group for this command to succeed.Run this script five times per project which you would like to onboard with the following values for
{{EVENT_TYPE}}
:git.repo.created
git.push
git.pullrequest.created
git.pullrequest.updated
git.pullrequest.merged
curl -u :{{PERSONAL_ACCESS_TOKEN}} --request POST \
-H "Content-Type: application/json" \
--data '{
"publisherId": "tfs",
"eventType": "{{EVENT_TYPE}}",
"resourceVersion": "1.0",
"consumerId": "webHooks",
"consumerActionId": "httpRequest",
"publisherInputs": {
"projectId": "{{PROJECT_UUID}}"
},
"consumerInputs": {
"url": "https://hooks.foundational.io/api/v1/azure_repos_webhook?id_={{ORG_NAME}}",
"basicAuthUsername": "foundational-webhook",
"basicAuthPassword": "{{WEBHOOK_PASSWORD}}",
"resourceDetailsToSend": "all"
}
}' \
"https://dev.azure.com/{{ORG_NAME}}/_apis/hooks/subscriptions?api-version=7.1"