Merge pull request #10527 from marleypowell/marley/9709-ado-team-loading-issue
fix: Stop loading all teams when plugin is initialized
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-azure-devops-backend': patch
|
||||
---
|
||||
|
||||
Stop loading all teams when plugin is initialized
|
||||
@@ -40,11 +40,6 @@ export class PullRequestsDashboardProvider {
|
||||
azureDevOpsApi: AzureDevOpsApi,
|
||||
): Promise<PullRequestsDashboardProvider> {
|
||||
const provider = new PullRequestsDashboardProvider(logger, azureDevOpsApi);
|
||||
try {
|
||||
await provider.readTeams();
|
||||
} catch (error) {
|
||||
logger.warn(`Failed to load azure team information, ${error}`);
|
||||
}
|
||||
return provider;
|
||||
}
|
||||
|
||||
@@ -115,6 +110,8 @@ export class PullRequestsDashboardProvider {
|
||||
const dashboardPullRequests =
|
||||
await this.azureDevOpsApi.getDashboardPullRequests(projectName, options);
|
||||
|
||||
await this.getAllTeams(); // Make sure team members are loaded
|
||||
|
||||
return dashboardPullRequests.map(pr => {
|
||||
if (pr.createdBy?.id) {
|
||||
const teamIds = this.teamMembers.get(pr.createdBy.id)?.memberOf;
|
||||
|
||||
Reference in New Issue
Block a user