зеркало из
1
0
Форкнуть 0
opensource-management-portal/interfaces/github/repoMetadata.ts

48 строки
1.1 KiB
TypeScript

//
// Copyright (c) Microsoft.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
import { IOperationsInstance, IOperationsRepositoryMetadataProvider, throwIfNotCapable } from './operations';
import { GitHubRepositoryPermission } from './repos';
import { CoreCapability } from './rest';
export interface IRepositoryMetadataPermissionPair {
id: string;
permission: GitHubRepositoryPermission;
}
export interface IRepositoryMetadata {
schema: string;
apiVersion: string;
correlationId: string;
id: string;
created: Date;
name: string;
description: string;
visibility: string;
policy: string;
policyUrl: string;
license: string;
legalEntity: string;
template: string;
gitIgnoreTemplate: string;
teamPermissions: IRepositoryMetadataPermissionPair[];
}
export function getRepositoryMetadataProvider(operations: IOperationsInstance) {
const ops = throwIfNotCapable<IOperationsRepositoryMetadataProvider>(
operations,
CoreCapability.RepositoryMetadataProvider
);
return ops.repositoryMetadataProvider;
}