Merge branch 'master' into af/add-readme-card-azure-devops
Signed-off-by: alissonfabiano <56898864+alissonfabiano@users.noreply.github.com>
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
# @backstage/plugin-azure-devops-backend
|
||||
|
||||
## 0.3.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @backstage/backend-common@0.15.0
|
||||
|
||||
## 0.3.14-next.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -21,8 +21,6 @@ import { TeamMember } from '@backstage/plugin-azure-devops-common';
|
||||
import { UrlReader } from '@backstage/backend-common';
|
||||
import { WebApi } from 'azure-devops-node-api';
|
||||
|
||||
// Warning: (ae-missing-release-tag) "AzureDevOpsApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
export class AzureDevOpsApi {
|
||||
constructor(logger: Logger, webApi: WebApi, urlReader: UrlReader);
|
||||
@@ -90,22 +88,15 @@ export class AzureDevOpsApi {
|
||||
top: number,
|
||||
): Promise<RepoBuild[]>;
|
||||
// (undocumented)
|
||||
getTeamMembers({
|
||||
projectId,
|
||||
teamId,
|
||||
}: {
|
||||
getTeamMembers(options: {
|
||||
projectId: string;
|
||||
teamId: string;
|
||||
}): Promise<TeamMember[] | undefined>;
|
||||
}
|
||||
|
||||
// Warning: (ae-missing-release-tag) "createRouter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
export function createRouter(options: RouterOptions): Promise<express.Router>;
|
||||
|
||||
// Warning: (ae-missing-release-tag) "RouterOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
export interface RouterOptions {
|
||||
// (undocumented)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@backstage/plugin-azure-devops-backend",
|
||||
"version": "0.3.14-next.0",
|
||||
"version": "0.3.14",
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"license": "Apache-2.0",
|
||||
@@ -23,7 +23,7 @@
|
||||
"clean": "backstage-cli package clean"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/backend-common": "^0.15.0-next.0",
|
||||
"@backstage/backend-common": "^0.15.0",
|
||||
"@backstage/config": "^1.0.1",
|
||||
"@backstage/plugin-azure-devops-common": "^0.2.4",
|
||||
"@types/express": "^4.17.6",
|
||||
@@ -36,7 +36,7 @@
|
||||
"mime-types": "^2.1.27"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.18.1-next.0",
|
||||
"@backstage/cli": "^0.18.1",
|
||||
"@types/supertest": "^2.0.8",
|
||||
"supertest": "^6.1.6",
|
||||
"msw": "^0.44.0"
|
||||
|
||||
@@ -56,6 +56,7 @@ import {
|
||||
} from 'azure-devops-node-api/interfaces/CoreInterfaces';
|
||||
import { UrlReader } from '@backstage/backend-common';
|
||||
|
||||
/** @public */
|
||||
export class AzureDevOpsApi {
|
||||
public constructor(
|
||||
private readonly logger: Logger,
|
||||
@@ -77,6 +78,7 @@ export class AzureDevOpsApi {
|
||||
a.name && b.name ? a.name.localeCompare(b.name) : 0,
|
||||
);
|
||||
}
|
||||
|
||||
public async getGitRepository(
|
||||
projectName: string,
|
||||
repoName: string,
|
||||
@@ -298,13 +300,11 @@ export class AzureDevOpsApi {
|
||||
);
|
||||
}
|
||||
|
||||
public async getTeamMembers({
|
||||
projectId,
|
||||
teamId,
|
||||
}: {
|
||||
public async getTeamMembers(options: {
|
||||
projectId: string;
|
||||
teamId: string;
|
||||
}): Promise<TeamMember[] | undefined> {
|
||||
const { projectId, teamId } = options;
|
||||
this.logger?.debug(`Getting team member ids for team '${teamId}'.`);
|
||||
|
||||
const client = await this.webApi.getCoreApi();
|
||||
|
||||
@@ -31,6 +31,7 @@ import express from 'express';
|
||||
|
||||
const DEFAULT_TOP = 10;
|
||||
|
||||
/** @public */
|
||||
export interface RouterOptions {
|
||||
azureDevOpsApi?: AzureDevOpsApi;
|
||||
logger: Logger;
|
||||
@@ -38,6 +39,7 @@ export interface RouterOptions {
|
||||
reader: UrlReader;
|
||||
}
|
||||
|
||||
/** @public */
|
||||
export async function createRouter(
|
||||
options: RouterOptions,
|
||||
): Promise<express.Router> {
|
||||
|
||||
Reference in New Issue
Block a user