api-reports and changeset added
Signed-off-by: Deepankumar Loganathan <deepan0433@gmail.com>
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
---
|
||||
'@backstage/plugin-azure-devops-backend': minor
|
||||
'@backstage/plugin-azure-devops': minor
|
||||
'@backstage/plugin-azure-devops-common': patch
|
||||
---
|
||||
|
||||
Azure DevOps plugin is now integrated with permission framework for the below features
|
||||
|
||||
1. PullRequest
|
||||
2. Dashboard Pull Request
|
||||
3. Pipeline
|
||||
4. GitTag
|
||||
5. Readme
|
||||
@@ -25,5 +25,6 @@ export default async function createPlugin(
|
||||
logger: env.logger,
|
||||
config: env.config,
|
||||
reader: env.reader,
|
||||
permissions: env.permissions,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ import { GitRepository } from 'azure-devops-node-api/interfaces/GitInterfaces';
|
||||
import { GitTag } from '@backstage/plugin-azure-devops-common';
|
||||
import { LocationSpec } from '@backstage/plugin-catalog-common';
|
||||
import { Logger } from 'winston';
|
||||
import { PermissionEvaluator } from '@backstage/plugin-permission-common';
|
||||
import { Project } from '@backstage/plugin-azure-devops-common';
|
||||
import { PullRequest } from '@backstage/plugin-azure-devops-common';
|
||||
import { PullRequestOptions } from '@backstage/plugin-azure-devops-common';
|
||||
@@ -160,6 +161,8 @@ export interface RouterOptions {
|
||||
// (undocumented)
|
||||
logger: Logger;
|
||||
// (undocumented)
|
||||
permissions: PermissionEvaluator;
|
||||
// (undocumented)
|
||||
reader: UrlReader;
|
||||
}
|
||||
```
|
||||
|
||||
@@ -18,10 +18,13 @@ import {
|
||||
createServiceBuilder,
|
||||
loadBackendConfig,
|
||||
UrlReaders,
|
||||
ServerTokenManager,
|
||||
HostDiscovery,
|
||||
} from '@backstage/backend-common';
|
||||
import { Server } from 'http';
|
||||
import { Logger } from 'winston';
|
||||
import { createRouter } from './router';
|
||||
import { ServerPermissionClient } from '@backstage/plugin-permission-node';
|
||||
|
||||
export interface ServerOptions {
|
||||
port: number;
|
||||
@@ -34,13 +37,23 @@ export async function startStandaloneServer(
|
||||
): Promise<Server> {
|
||||
const logger = options.logger.child({ service: 'azure-devops-backend' });
|
||||
const config = await loadBackendConfig({ logger, argv: process.argv });
|
||||
const discovery = HostDiscovery.fromConfig(config);
|
||||
|
||||
logger.debug('Starting application server...');
|
||||
|
||||
const tokenManager = ServerTokenManager.fromConfig(config, {
|
||||
logger,
|
||||
});
|
||||
const permissions = ServerPermissionClient.fromConfig(config, {
|
||||
discovery,
|
||||
tokenManager,
|
||||
});
|
||||
|
||||
const router = await createRouter({
|
||||
logger,
|
||||
config,
|
||||
reader: UrlReaders.default({ logger, config }),
|
||||
permissions,
|
||||
});
|
||||
|
||||
let service = createServiceBuilder(module)
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
import { BasicPermission } from '@backstage/plugin-permission-common';
|
||||
import { ResourcePermission } from '@backstage/plugin-permission-common';
|
||||
|
||||
// @public (undocumented)
|
||||
export const AZURE_DEVOPS_BUILD_DEFINITION_ANNOTATION =
|
||||
'dev.azure.com/build-definition';
|
||||
@@ -22,6 +25,39 @@ export const AZURE_DEVOPS_README_ANNOTATION = 'dev.azure.com/readme-path';
|
||||
// @public (undocumented)
|
||||
export const AZURE_DEVOPS_REPO_ANNOTATION = 'dev.azure.com/project-repo';
|
||||
|
||||
// Warning: (ae-missing-release-tag) "azureDevOpsGitTagReadPermission" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
export const azureDevOpsGitTagReadPermission: ResourcePermission<'catalog-entity'>;
|
||||
|
||||
// Warning: (ae-missing-release-tag) "azureDevOpsPermissions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
export const azureDevOpsPermissions: (
|
||||
| BasicPermission
|
||||
| ResourcePermission<'catalog-entity'>
|
||||
)[];
|
||||
|
||||
// Warning: (ae-missing-release-tag) "azureDevOpsPipelineReadPermission" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
export const azureDevOpsPipelineReadPermission: ResourcePermission<'catalog-entity'>;
|
||||
|
||||
// Warning: (ae-missing-release-tag) "azureDevOpsPullRequestDashboardReadPermission" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
export const azureDevOpsPullRequestDashboardReadPermission: BasicPermission;
|
||||
|
||||
// Warning: (ae-missing-release-tag) "azureDevOpsPullRequestReadPermission" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
export const azureDevOpsPullRequestReadPermission: ResourcePermission<'catalog-entity'>;
|
||||
|
||||
// Warning: (ae-missing-release-tag) "azureDevOpsReadmeReadPermission" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
export const azureDevOpsReadmeReadPermission: ResourcePermission<'catalog-entity'>;
|
||||
|
||||
// @public (undocumented)
|
||||
export enum BuildResult {
|
||||
Canceled = 32,
|
||||
@@ -226,6 +262,8 @@ export interface Readme {
|
||||
|
||||
// @public (undocumented)
|
||||
export interface ReadmeConfig {
|
||||
// (undocumented)
|
||||
entityRef: string;
|
||||
// (undocumented)
|
||||
host?: string;
|
||||
// (undocumented)
|
||||
|
||||
@@ -69,6 +69,7 @@ export interface AzureDevOpsApi {
|
||||
// (undocumented)
|
||||
getBuildRuns(
|
||||
projectName: string,
|
||||
entityRef: string,
|
||||
repoName?: string,
|
||||
definitionName?: string,
|
||||
host?: string,
|
||||
@@ -85,6 +86,7 @@ export interface AzureDevOpsApi {
|
||||
getGitTags(
|
||||
projectName: string,
|
||||
repoName: string,
|
||||
entityRef: string,
|
||||
host?: string,
|
||||
org?: string,
|
||||
): Promise<{
|
||||
@@ -94,6 +96,7 @@ export interface AzureDevOpsApi {
|
||||
getPullRequests(
|
||||
projectName: string,
|
||||
repoName: string,
|
||||
entityRef: string,
|
||||
host?: string,
|
||||
org?: string,
|
||||
options?: PullRequestOptions,
|
||||
@@ -127,6 +130,7 @@ export class AzureDevOpsClient implements AzureDevOpsApi {
|
||||
// (undocumented)
|
||||
getBuildRuns(
|
||||
projectName: string,
|
||||
entityRef: string,
|
||||
repoName?: string,
|
||||
definitionName?: string,
|
||||
host?: string,
|
||||
@@ -143,6 +147,7 @@ export class AzureDevOpsClient implements AzureDevOpsApi {
|
||||
getGitTags(
|
||||
projectName: string,
|
||||
repoName: string,
|
||||
entityRef: string,
|
||||
host?: string,
|
||||
org?: string,
|
||||
): Promise<{
|
||||
@@ -152,6 +157,7 @@ export class AzureDevOpsClient implements AzureDevOpsApi {
|
||||
getPullRequests(
|
||||
projectName: string,
|
||||
repoName: string,
|
||||
entityRef: string,
|
||||
host?: string,
|
||||
org?: string,
|
||||
options?: PullRequestOptions,
|
||||
|
||||
Reference in New Issue
Block a user