feat: Created PullRequestsDashboardProvider for resolving team and team member relations
Signed-off-by: Marley Powell <Marley.Powell@exclaimer.com>
This commit is contained in:
@@ -49,4 +49,6 @@ export interface AzureDevOpsApi {
|
||||
): Promise<DashboardPullRequest[]>;
|
||||
|
||||
getAllTeams(): Promise<Team[]>;
|
||||
|
||||
getUserTeamIds(userId: string): Promise<string[]>;
|
||||
}
|
||||
|
||||
@@ -88,6 +88,10 @@ export class AzureDevOpsClient implements AzureDevOpsApi {
|
||||
return this.get<Team[]>('all-teams');
|
||||
}
|
||||
|
||||
public getUserTeamIds(userId: string): Promise<string[]> {
|
||||
return this.get<string[]>(`users/${userId}/team-ids`);
|
||||
}
|
||||
|
||||
private async get<T>(path: string): Promise<T> {
|
||||
const baseUrl = `${await this.discoveryApi.getBaseUrl('azure-devops')}/`;
|
||||
const url = new URL(path, baseUrl);
|
||||
|
||||
Reference in New Issue
Block a user