Skip to content
Open
1 change: 1 addition & 0 deletions lib/modules/platform/azure/azure-got-wrapper.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ describe('modules/platform/azure/azure-got-wrapper', () => {
expect(azure.gitApi).toThrow('No config found for azure');
expect(azure.coreApi).toThrow('No config found for azure');
expect(azure.policyApi).toThrow('No config found for azure');
expect(azure.workItemTrackingApi).toThrow('No config found for azure');
});

it('should set personal access token and endpoint', () => {
Expand Down
5 changes: 5 additions & 0 deletions lib/modules/platform/azure/azure-got-wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import type { ICoreApi } from 'azure-devops-node-api/CoreApi.js';
import type { IGitApi } from 'azure-devops-node-api/GitApi.js';
import type { IRequestHandler } from 'azure-devops-node-api/interfaces/common/VsoBaseInterfaces.js';
import type { IPolicyApi } from 'azure-devops-node-api/PolicyApi.js';
import type { IWorkItemTrackingApi } from 'azure-devops-node-api/WorkItemTrackingApi.js';
import type { HostRule } from '../../../types/index.ts';
import * as hostRules from '../../../util/host-rules.ts';

Expand Down Expand Up @@ -42,6 +43,10 @@ export function policyApi(): Promise<IPolicyApi> {
return azureObj().getPolicyApi();
}

export function workItemTrackingApi(): Promise<IWorkItemTrackingApi> {
return azureObj().getWorkItemTrackingApi();
}

export function setEndpoint(e: string): void {
endpoint = e;
}
Loading
Loading