Skip to content

Commit 79af615

Browse files
committed
WIP: Sends request Azure for an issue or PR and prints the result
(#3977)
1 parent f6d03e9 commit 79af615

File tree

4 files changed

+415
-4
lines changed

4 files changed

+415
-4
lines changed

Diff for: src/container.ts

+23
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import type { CloudIntegrationService } from './plus/integrations/authentication
3535
import { ConfiguredIntegrationService } from './plus/integrations/authentication/configuredIntegrationService';
3636
import { IntegrationAuthenticationService } from './plus/integrations/authentication/integrationAuthenticationService';
3737
import { IntegrationService } from './plus/integrations/integrationService';
38+
import type { AzureDevOpsApi } from './plus/integrations/providers/azure/azure';
3839
import type { GitHubApi } from './plus/integrations/providers/github/github';
3940
import type { GitLabApi } from './plus/integrations/providers/gitlab/gitlab';
4041
import { EnrichmentService } from './plus/launchpad/enrichmentService';
@@ -477,6 +478,28 @@ export class Container {
477478
return this._git;
478479
}
479480

481+
private _azure: Promise<AzureDevOpsApi | undefined> | undefined;
482+
get azure(): Promise<AzureDevOpsApi | undefined> {
483+
if (this._azure == null) {
484+
async function load(this: Container) {
485+
try {
486+
const azure = new (
487+
await import(/* webpackChunkName: "integrations" */ './plus/integrations/providers/azure/azure')
488+
).AzureDevOpsApi(this);
489+
this._disposables.push(azure);
490+
return azure;
491+
} catch (ex) {
492+
Logger.error(ex);
493+
return undefined;
494+
}
495+
}
496+
497+
this._azure = load.call(this);
498+
}
499+
500+
return this._azure;
501+
}
502+
480503
private _github: Promise<GitHubApi | undefined> | undefined;
481504
get github(): Promise<GitHubApi | undefined> {
482505
if (this._github == null) {

0 commit comments

Comments
 (0)