Skip to content

Commit df1e2dd

Browse files
waleedlatif1mzxchandragreptile-apps[bot]claude
authored
feat(azure-devops): block and trigger (#4664)
* azure devops logo on white * generated ADO tool docs * generated ADO tool docs * added ADO to registries * ADO workflow triggers * ADO workflow triggers * tool layer for ADO, checks passed and manual verified * ADO workflow triggers * block layer for ADO * ADO icon svg * generated docs for ADO triggers * committing the tests for azure devops tools and blocks * Update apps/sim/triggers/azure_devops/utils.ts Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * Update apps/sim/tools/azure_devops/update_work_item.ts Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * Update apps/sim/triggers/azure_devops/utils.ts Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * comma syntax error patched * azure devops: validate-integration fixes + manual description - bgColor switched from white to Azure DevOps brand color #0078D4 (block + mdx) - WIQL query_work_items: hydrate ALL matched IDs by chunking through batches of 200 instead of silently truncating; check response.ok on the follow-up fetch and surface a clear error on 4xx/5xx; trim org/project; expose totalMatched in metadata so users can see pre-hydration count - Add MANUAL-CONTENT-START:intro section to the azure_devops.mdx docs page - Update unit tests for new chunking behavior and update-work-item validation Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * azure_devops: second-pass audit fixes + formatter cleanup - Add types barrel export to tools/azure_devops/index.ts - Normalize comment endpoint path casing (/workItems/ -> /workitems/) - Update test assertions to match normalized path - Biome formatter reflow across tools, triggers, registry, and docs icon Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * azure_devops: address PR review comments - Fix bgColor #FFFFFF -> #0078D4 in integrations.json and triggers/azure_devops.mdx - Bump File tool operationCount from 4 to 5 (Read, Fetch, Get, Write, Append) - Apply .trim() to org/project across all 15 remaining tools (consistency with query_work_items) - Fix Found ${data.count} -> Found ${data.count ?? items.length} fallback in list_builds, list_pipelines, list_pipeline_runs content strings Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * idemtpotency * azure_devops: address bugbot review comments - triggers/utils: match build.complete result case-insensitively, accept stopped/cancelled in addition to failed/canceled/partiallySucceeded so PascalCase and legacy Azure DevOps payloads aren't dropped - get_work_items_batch: chunk comma-separated IDs into 200-batch loops with proper status checks (was failing or returning incomplete data on >200 IDs) - Add tests for both behaviors Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * azure_devops: address additional bugbot comments - Block update_work_item now forwards areaPath; the Area Path subblock condition expanded to include update operation - get_build_timeline.failedRecords now also flags partiallySucceeded and succeededWithIssues, normalized case-insensitively. Output description and added a focused test Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * azure_devops: address more bugbot comments - Webhook provider extractIdempotencyId returns null when subscriptionId or notificationId is missing/empty, preventing the literal "azure_devops:undefined:undefined" key from collapsing unrelated deliveries into duplicates - Get Work Items Batch validates that at least one non-empty ID is supplied before issuing the API request, throwing a clear error instead of hitting an empty ids= query - Tests cover both behaviors Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * azure_devops: pin add_comment to documented api-version 7.0-preview.3 Microsoft's Add Comments docs only publish 7.0-preview.3 (the 7.2 view falls back to the 7.0 page). Get Comments stays on the documented 7.2-preview.4. Matches what's strictly in the Azure DevOps REST API reference rather than relying on undocumented version behavior. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> --------- Co-authored-by: Marcus Chandra <mzxchandra@gmail.com> Co-authored-by: mzxchandra <129460234+mzxchandra@users.noreply.github.com> Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 49f70bc commit df1e2dd

41 files changed

Lines changed: 6121 additions & 1 deletion

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/docs/components/icons.tsx

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3126,6 +3126,36 @@ export function AzureIcon(props: SVGProps<SVGSVGElement>) {
31263126
)
31273127
}
31283128

3129+
export function AzureDevOpsIcon(props: SVGProps<SVGSVGElement>) {
3130+
const id = useId()
3131+
const gradientId = `azure_devops_gradient_${id}`
3132+
return (
3133+
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 128 128' {...props}>
3134+
<defs>
3135+
<linearGradient
3136+
id={gradientId}
3137+
gradientUnits='userSpaceOnUse'
3138+
x1='9'
3139+
y1='16.97'
3140+
x2='9'
3141+
y2='1.03'
3142+
gradientTransform='scale(7.11111)'
3143+
>
3144+
<stop offset='0' stopColor='#0078d4' />
3145+
<stop offset='.16' stopColor='#1380da' />
3146+
<stop offset='.53' stopColor='#3c91e5' />
3147+
<stop offset='.82' stopColor='#559cec' />
3148+
<stop offset='1' stopColor='#5ea0ef' />
3149+
</linearGradient>
3150+
</defs>
3151+
<path
3152+
fill={`url(#${gradientId})`}
3153+
d='M120.89 28.445v69.262l-28.445 23.324-44.09-16.07v15.93L23.395 88.25l72.746 5.688V31.574ZM96.64 31.93 55.82 7.11v16.285L18.348 34.418 7.109 48.852v32.785l16.075 7.11V46.718Zm0 0'
3154+
/>
3155+
</svg>
3156+
)
3157+
}
3158+
31293159
export const GroqIcon = (props: SVGProps<SVGSVGElement>) => (
31303160
<svg
31313161
{...props}

apps/docs/components/ui/icon-mapping.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {
2020
AshbyIcon,
2121
AthenaIcon,
2222
AttioIcon,
23+
AzureDevOpsIcon,
2324
AzureIcon,
2425
BoxCompanyIcon,
2526
BrainIcon,
@@ -226,6 +227,7 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
226227
ashby: AshbyIcon,
227228
athena: AthenaIcon,
228229
attio: AttioIcon,
230+
azure_devops: AzureDevOpsIcon,
229231
box: BoxCompanyIcon,
230232
brandfetch: BrandfetchIcon,
231233
brightdata: BrightDataIcon,

apps/docs/content/docs/en/tools/azure_devops.mdx

Lines changed: 554 additions & 0 deletions
Large diffs are not rendered by default.

apps/docs/content/docs/en/tools/meta.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"ashby",
1818
"athena",
1919
"attio",
20+
"azure_devops",
2021
"box",
2122
"brandfetch",
2223
"brightdata",
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
title: Azure Devops
3+
description: Available Azure Devops triggers for automating workflows
4+
---
5+
6+
import { BlockInfoCard } from "@/components/ui/block-info-card"
7+
8+
<BlockInfoCard
9+
type="azure_devops"
10+
color="#0078D4"
11+
/>
12+
13+
Azure Devops provides 3 triggers for automating workflows based on events.
14+
15+
## Triggers
16+
17+
### Azure DevOps Build Failed
18+
19+
Trigger workflow when an Azure DevOps build fails, is canceled, or partially succeeds
20+
21+
#### Output
22+
23+
| Parameter | Type | Description |
24+
| --------- | ---- | ----------- |
25+
| `buildId` | number | Build ID |
26+
| `buildNumber` | string | Build number string \(e.g. 20240101.1\) |
27+
| `result` | string | Build result: failed \| canceled \| partiallySucceeded |
28+
| `pipelineId` | number | Pipeline definition ID |
29+
| `pipelineName` | string | Pipeline definition name |
30+
| `projectName` | string | Azure DevOps project name |
31+
| `branch` | string | Source branch name \(refs/heads/ prefix stripped\) |
32+
| `commitSha` | string | Source commit SHA |
33+
| `triggeredBy` | string | Display name of the person who triggered the build |
34+
| `triggeredByEmail` | string | Email/unique name of the person who triggered the build |
35+
| `startTime` | string | Build start time \(ISO 8601\) |
36+
| `finishTime` | string | Build finish time \(ISO 8601\) |
37+
| `buildUrl` | string | API URL for the build resource |
38+
39+
40+
---
41+
42+
### Azure DevOps Webhook (All Service Hook Events)
43+
44+
Trigger on whichever service hook event types you configure in Azure DevOps. Sim does not filter deliveries for this trigger.
45+
46+
#### Output
47+
48+
| Parameter | Type | Description |
49+
| --------- | ---- | ----------- |
50+
| `eventType` | string | Service hook event type \(e.g. build.complete, workitem.created\) |
51+
| `notificationId` | number | Notification ID |
52+
| `subscriptionId` | string | Service hook subscription ID |
53+
| `publisherId` | string | Publisher ID \(e.g. tfs\) |
54+
| `createdDate` | string | Event creation time \(ISO 8601\) |
55+
| `resource` | json | Event resource payload |
56+
| `resourceContainers` | json | Resource container references \(project, collection, etc.\) |
57+
| `message` | json | Short message object |
58+
| `detailedMessage` | json | Detailed message object |
59+
60+
61+
---
62+
63+
### Azure DevOps Work Item Created
64+
65+
Trigger workflow when a work item is created in Azure DevOps
66+
67+
#### Output
68+
69+
| Parameter | Type | Description |
70+
| --------- | ---- | ----------- |
71+
| `workItemId` | number | Work item ID |
72+
| `workItemType` | string | Work item type for Basic process \(e.g. Issue, Task, Epic\) |
73+
| `title` | string | Work item title |
74+
| `state` | string | Work item state for Basic process \(e.g. To Do, Doing, Done\) |
75+
| `createdBy` | string | Display name of the creator |
76+
| `assignedTo` | string | Assignee display name, or empty string if unassigned |
77+
| `priority` | number | Priority \(1–4\), or 0 if not set |
78+
| `areaPath` | string | Area path |
79+
| `iterationPath` | string | Iteration path |
80+
| `description` | string | Work item description \(HTML\), or empty string if not set |
81+
| `projectName` | string | Azure DevOps project name |
82+
| `workItemUrl` | string | API URL for the work item resource |
83+

apps/docs/content/docs/en/triggers/meta.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"airtable",
99
"ashby",
1010
"attio",
11+
"azure_devops",
1112
"calcom",
1213
"calendly",
1314
"circleback",

apps/sim/app/(landing)/integrations/data/icon-mapping.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {
2020
AshbyIcon,
2121
AthenaIcon,
2222
AttioIcon,
23+
AzureDevOpsIcon,
2324
AzureIcon,
2425
BoxCompanyIcon,
2526
BrainIcon,
@@ -226,6 +227,7 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
226227
ashby: AshbyIcon,
227228
athena: AthenaIcon,
228229
attio: AttioIcon,
230+
azure_devops: AzureDevOpsIcon,
229231
box: BoxCompanyIcon,
230232
brandfetch: BrandfetchIcon,
231233
brightdata: BrightDataIcon,

apps/sim/app/(landing)/integrations/data/integrations.json

Lines changed: 104 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1882,6 +1882,105 @@
18821882
"integrationTypes": ["security"],
18831883
"tags": ["identity", "microsoft-365"]
18841884
},
1885+
{
1886+
"type": "azure_devops",
1887+
"slug": "azure-devops",
1888+
"name": "Azure DevOps",
1889+
"description": "Interact with Azure DevOps pipelines, builds, and work items",
1890+
"longDescription": "Integrate Azure DevOps into your workflow. List and inspect pipelines and builds, query and manage work items, and add or read comments.",
1891+
"bgColor": "#0078D4",
1892+
"iconName": "AzureDevOpsIcon",
1893+
"docsUrl": "https://docs.sim.ai/tools/azure_devops",
1894+
"operations": [
1895+
{
1896+
"name": "List Pipelines",
1897+
"description": "List all pipelines in an Azure DevOps project. Returns pipeline ID, name, folder, revision, and URL."
1898+
},
1899+
{
1900+
"name": "Get Pipeline",
1901+
"description": "Get details for a specific pipeline in an Azure DevOps project, including configuration and repository info."
1902+
},
1903+
{
1904+
"name": "List Pipeline Runs",
1905+
"description": "List runs for a specific pipeline in an Azure DevOps project. Returns run ID, name, state, result, and timestamps."
1906+
},
1907+
{
1908+
"name": "Get Pipeline Run",
1909+
"description": "Get details for a specific pipeline run in an Azure DevOps project. Returns run state, result, timestamps, and the pipeline reference."
1910+
},
1911+
{
1912+
"name": "List Builds",
1913+
"description": "List builds in an Azure DevOps project. Optionally filter by pipeline definition, status, result, or branch."
1914+
},
1915+
{
1916+
"name": "List Build Logs",
1917+
"description": "List all log entries for a specific build in Azure DevOps. Returns log IDs, types, and line counts — use the log ID with the Get Build Log tool to fetch actual log text."
1918+
},
1919+
{
1920+
"name": "Get Build Log",
1921+
"description": "Fetch the text content of a specific build log in Azure DevOps. Use List Build Logs first to get the log ID. Optionally retrieve only a line range with startLine/endLine."
1922+
},
1923+
{
1924+
"name": "Get Build Timeline",
1925+
"description": "Get the execution timeline for an Azure DevOps build — every stage, job, and task with its result and log ID. Use this to identify which steps failed before fetching their logs with Get Build Log."
1926+
},
1927+
{
1928+
"name": "Get Work Items Between Builds",
1929+
"description": "Get work item references associated with commits between two builds in Azure DevOps. Returns work item IDs and URLs — use Get Work Items Batch for full field details."
1930+
},
1931+
{
1932+
"name": "Query Work Items",
1933+
"description": "Execute a WIQL query to search for work items in Azure DevOps and return full field details. Use TOP N in your query to limit results (Azure enforces a 200-item maximum per batch fetch)."
1934+
},
1935+
{
1936+
"name": "Get Work Item",
1937+
"description": "Fetch full details of a single work item by ID from Azure DevOps, including title, state, type, assignee, and area path."
1938+
},
1939+
{
1940+
"name": "Get Work Items Batch",
1941+
"description": "Fetch full details for multiple work items by ID from Azure DevOps in a single call. Pass comma-separated IDs (e.g. "
1942+
},
1943+
{
1944+
"name": "Create Work Item",
1945+
"description": "Create a new Basic-process work item (Issue, Task, or Epic) in Azure DevOps. Returns the created work item with its assigned ID."
1946+
},
1947+
{
1948+
"name": "Update Work Item",
1949+
"description": "Update one or more fields on an existing work item in Azure DevOps. Provide only the fields you want to change."
1950+
},
1951+
{
1952+
"name": "Add Comment",
1953+
"description": "Add a comment to a work item in Azure DevOps."
1954+
},
1955+
{
1956+
"name": "Get Comments",
1957+
"description": "List comments for an Azure DevOps work item."
1958+
}
1959+
],
1960+
"operationCount": 16,
1961+
"triggers": [
1962+
{
1963+
"id": "azure_devops_build_failed",
1964+
"name": "Azure DevOps Build Failed",
1965+
"description": "Trigger workflow when an Azure DevOps build fails, is canceled, or partially succeeds"
1966+
},
1967+
{
1968+
"id": "azure_devops_work_item_created",
1969+
"name": "Azure DevOps Work Item Created",
1970+
"description": "Trigger workflow when a work item is created in Azure DevOps"
1971+
},
1972+
{
1973+
"id": "azure_devops_webhook",
1974+
"name": "Azure DevOps Webhook (All Service Hook Events)",
1975+
"description": "Trigger on whichever service hook event types you configure in Azure DevOps. Sim does not filter deliveries for this trigger."
1976+
}
1977+
],
1978+
"triggerCount": 3,
1979+
"authType": "api-key",
1980+
"category": "tools",
1981+
"integrationTypes": ["developer-tools", "productivity"],
1982+
"tags": ["ci-cd", "project-management", "version-control"]
1983+
},
18851984
{
18861985
"type": "box",
18871986
"slug": "box",
@@ -4057,6 +4156,10 @@
40574156
"name": "Fetch",
40584157
"description": "Fetch and parse a file from a URL with optional custom headers."
40594158
},
4159+
{
4160+
"name": "Get",
4161+
"description": "Get a workspace file object from a selected file or canonical workspace file ID."
4162+
},
40604163
{
40614164
"name": "Write",
40624165
"description": "Create a new workspace file. If a file with the same name already exists, a numeric suffix is added (e.g., "
@@ -4066,7 +4169,7 @@
40664169
"description": "Append content to an existing workspace file. The file must already exist. Content is added to the end of the file."
40674170
}
40684171
],
4069-
"operationCount": 4,
4172+
"operationCount": 5,
40704173
"triggers": [],
40714174
"triggerCount": 0,
40724175
"authType": "none",

0 commit comments

Comments
 (0)