Skip to content

Commit

Permalink
WIP: Sends request Azure for an issue or PR and prints the result
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeibbb committed Jan 28, 2025
1 parent f6d03e9 commit b1b10e7
Show file tree
Hide file tree
Showing 4 changed files with 415 additions and 4 deletions.
23 changes: 23 additions & 0 deletions src/container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import type { CloudIntegrationService } from './plus/integrations/authentication
import { ConfiguredIntegrationService } from './plus/integrations/authentication/configuredIntegrationService';
import { IntegrationAuthenticationService } from './plus/integrations/authentication/integrationAuthenticationService';
import { IntegrationService } from './plus/integrations/integrationService';
import type { AzureDevOpsApi } from './plus/integrations/providers/azure/azure';
import type { GitHubApi } from './plus/integrations/providers/github/github';
import type { GitLabApi } from './plus/integrations/providers/gitlab/gitlab';
import { EnrichmentService } from './plus/launchpad/enrichmentService';
Expand Down Expand Up @@ -477,6 +478,28 @@ export class Container {
return this._git;
}

private _azure: Promise<AzureDevOpsApi | undefined> | undefined;
get azure(): Promise<AzureDevOpsApi | undefined> {
if (this._azure == null) {
async function load(this: Container) {
try {
const azure = new (
await import(/* webpackChunkName: "integrations" */ './plus/integrations/providers/azure/azure')
).AzureDevOpsApi(this);
this._disposables.push(azure);
return azure;
} catch (ex) {
Logger.error(ex);
return undefined;
}
}

this._azure = load.call(this);
}

return this._azure;
}

private _github: Promise<GitHubApi | undefined> | undefined;
get github(): Promise<GitHubApi | undefined> {
if (this._github == null) {
Expand Down
Loading

0 comments on commit b1b10e7

Please sign in to comment.