Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/squad-sdk/src/platform/azure-devops.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,14 @@ function parseJson<T>(raw: string): T {
export function getAvailableWorkItemTypes(org: string, project: string): WorkItemTypeInfo[] {
const orgUrl = `https://dev.azure.com/${org}`;
try {
// Timeout after 3 s so tests and CI aren't blocked when az CLI is slow
// or tries to reach a non-existent org. The catch block returns defaults.
const raw = execFileSync('az', [
'boards', 'work-item', 'type', 'list',
'--org', orgUrl,
'--project', project,
'--output', 'json',
], EXEC_OPTS).trim();
], { ...EXEC_OPTS, timeout: 3_000 }).trim();

const types = parseJson<Array<{
name?: string;
Expand Down
Loading