From cfd98d5ecb1ccf1bbdd9a6b219f510f1c7cab1e4 Mon Sep 17 00:00:00 2001 From: Nick Marinelli Date: Wed, 15 Jun 2022 22:43:12 -0400 Subject: [PATCH 1/5] export more artifacts from azure-devops Signed-off-by: Nick Marinelli --- plugins/azure-devops/src/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/azure-devops/src/index.ts b/plugins/azure-devops/src/index.ts index 48177ee830..32399b1dff 100644 --- a/plugins/azure-devops/src/index.ts +++ b/plugins/azure-devops/src/index.ts @@ -25,6 +25,10 @@ export { } from './plugin'; export { AzurePullRequestsIcon } from './components/AzurePullRequestsIcon'; +export { AzureGitTagsIcon } from './components/AzureGitTagsIcon'; + +export { azureDevOpsApiRef } from './api'; +export * from './hooks'; export { FilterType } from './components/PullRequestsPage'; export type { From e049e410489548fac3402264f335ac8da55b7376 Mon Sep 17 00:00:00 2001 From: Nick Marinelli Date: Wed, 15 Jun 2022 22:55:43 -0400 Subject: [PATCH 2/5] changeset Signed-off-by: Nick Marinelli --- .changeset/smooth-sheep-hide.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/smooth-sheep-hide.md diff --git a/.changeset/smooth-sheep-hide.md b/.changeset/smooth-sheep-hide.md new file mode 100644 index 0000000000..8a65602ca9 --- /dev/null +++ b/.changeset/smooth-sheep-hide.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-azure-devops': patch +--- + +Exporting azureDevOpsApiRef, AzureGitTagsIcon, and all hooks for the benefit of other plugins. From 132fc6064646bc17b7fdad69a6e4ae8623048139 Mon Sep 17 00:00:00 2001 From: Nick Marinelli Date: Thu, 16 Jun 2022 09:58:21 -0400 Subject: [PATCH 3/5] api report and export actual api Signed-off-by: Nick Marinelli --- plugins/azure-devops/api-report.md | 186 +++++++++++++++++++++++++++++ plugins/azure-devops/src/index.ts | 2 +- 2 files changed, 187 insertions(+), 1 deletion(-) diff --git a/plugins/azure-devops/api-report.md b/plugins/azure-devops/api-report.md index 9760340771..6f3a148fb9 100644 --- a/plugins/azure-devops/api-report.md +++ b/plugins/azure-devops/api-report.md @@ -5,10 +5,22 @@ ```ts /// +import { ApiRef } from '@backstage/core-plugin-api'; import { BackstagePlugin } from '@backstage/core-plugin-api'; +import { BuildRun } from '@backstage/plugin-azure-devops-common'; +import { BuildRunOptions } from '@backstage/plugin-azure-devops-common'; import { DashboardPullRequest } from '@backstage/plugin-azure-devops-common'; +import { DiscoveryApi } from '@backstage/core-plugin-api'; import { Entity } from '@backstage/catalog-model'; +import { GitTag } from '@backstage/plugin-azure-devops-common'; +import { IdentityApi } from '@backstage/core-plugin-api'; +import { PullRequest } from '@backstage/plugin-azure-devops-common'; +import { PullRequestOptions } from '@backstage/plugin-azure-devops-common'; +import { PullRequestStatus } from '@backstage/plugin-azure-devops-common'; +import { RepoBuild } from '@backstage/plugin-azure-devops-common'; +import { RepoBuildOptions } from '@backstage/plugin-azure-devops-common'; import { SvgIconProps } from '@material-ui/core'; +import { Team } from '@backstage/plugin-azure-devops-common'; // Warning: (ae-missing-release-tag) "AllFilter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -55,11 +67,117 @@ export type AssignedToUserFilter = BaseFilter & } ); +// 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 interface AzureDevOpsApi { + // (undocumented) + getAllTeams(): Promise; + // (undocumented) + getBuildRuns( + projectName: string, + repoName?: string, + definitionName?: string, + options?: BuildRunOptions, + ): Promise<{ + items: BuildRun[]; + }>; + // (undocumented) + getDashboardPullRequests( + projectName: string, + ): Promise; + // (undocumented) + getGitTags( + projectName: string, + repoName: string, + ): Promise<{ + items: GitTag[]; + }>; + // (undocumented) + getPullRequests( + projectName: string, + repoName: string, + options?: PullRequestOptions, + ): Promise<{ + items: PullRequest[]; + }>; + // (undocumented) + getRepoBuilds( + projectName: string, + repoName: string, + options?: RepoBuildOptions, + ): Promise<{ + items: RepoBuild[]; + }>; + // (undocumented) + getUserTeamIds(userId: string): Promise; +} + +// Warning: (ae-missing-release-tag) "azureDevOpsApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export const azureDevOpsApiRef: ApiRef; + +// Warning: (ae-missing-release-tag) "AzureDevOpsClient" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export class AzureDevOpsClient implements AzureDevOpsApi { + constructor(options: { + discoveryApi: DiscoveryApi; + identityApi: IdentityApi; + }); + // (undocumented) + getAllTeams(): Promise; + // (undocumented) + getBuildRuns( + projectName: string, + repoName?: string, + definitionName?: string, + options?: BuildRunOptions, + ): Promise<{ + items: BuildRun[]; + }>; + // (undocumented) + getDashboardPullRequests( + projectName: string, + ): Promise; + // (undocumented) + getGitTags( + projectName: string, + repoName: string, + ): Promise<{ + items: GitTag[]; + }>; + // (undocumented) + getPullRequests( + projectName: string, + repoName: string, + options?: PullRequestOptions, + ): Promise<{ + items: PullRequest[]; + }>; + // (undocumented) + getRepoBuilds( + projectName: string, + repoName: string, + options?: RepoBuildOptions, + ): Promise<{ + items: RepoBuild[]; + }>; + // (undocumented) + getUserTeamIds(userId: string): Promise; +} + // Warning: (ae-missing-release-tag) "azureDevOpsPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) export const azureDevOpsPlugin: BackstagePlugin<{}, {}>; +// Warning: (ae-missing-release-tag) "AzureGitTagsIcon" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export const AzureGitTagsIcon: (props: SvgIconProps) => JSX.Element; + // Warning: (ae-missing-release-tag) "AzurePullRequestsIcon" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) @@ -226,5 +344,73 @@ export interface PullRequestColumnConfig { // @public (undocumented) export type PullRequestFilter = (pullRequest: DashboardPullRequest) => boolean; +// Warning: (ae-missing-release-tag) "useAllTeams" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export function useAllTeams(): { + teams?: Team[]; + loading: boolean; + error?: Error; +}; + +// Warning: (ae-missing-release-tag) "useDashboardPullRequests" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export function useDashboardPullRequests( + project?: string, + pollingInterval?: number, +): { + pullRequests?: DashboardPullRequest[]; + loading: boolean; + error?: Error; +}; + +// Warning: (ae-missing-release-tag) "useProjectRepoFromEntity" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export function useProjectRepoFromEntity(entity: Entity): { + project: string; + repo: string; +}; + +// Warning: (ae-missing-release-tag) "usePullRequests" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export function usePullRequests( + entity: Entity, + defaultLimit?: number, + requestedStatus?: PullRequestStatus, +): { + items?: PullRequest[]; + loading: boolean; + error?: Error; +}; + +// Warning: (ae-missing-release-tag) "useRepoBuilds" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export function useRepoBuilds( + entity: Entity, + defaultLimit?: number, +): { + items?: RepoBuild[]; + loading: boolean; + error?: Error; +}; + +// Warning: (ae-missing-release-tag) "useUserEmail" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export function useUserEmail(): string | undefined; + +// Warning: (ae-missing-release-tag) "useUserTeamIds" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export function useUserTeamIds(userId: string | undefined): { + teamIds?: string[]; + loading: boolean; + error?: Error; +}; + // (No @packageDocumentation comment for this package) ``` diff --git a/plugins/azure-devops/src/index.ts b/plugins/azure-devops/src/index.ts index 32399b1dff..1f66411d7b 100644 --- a/plugins/azure-devops/src/index.ts +++ b/plugins/azure-devops/src/index.ts @@ -27,7 +27,7 @@ export { export { AzurePullRequestsIcon } from './components/AzurePullRequestsIcon'; export { AzureGitTagsIcon } from './components/AzureGitTagsIcon'; -export { azureDevOpsApiRef } from './api'; +export * from './api'; export * from './hooks'; export { FilterType } from './components/PullRequestsPage'; From 3c6028af1ba2878a91345d7e815d76624425502a Mon Sep 17 00:00:00 2001 From: Nick Marinelli Date: Thu, 16 Jun 2022 11:51:25 -0400 Subject: [PATCH 4/5] add AzurePipelinesIcon Signed-off-by: Nick Marinelli --- plugins/azure-devops/api-report.md | 5 +++++ plugins/azure-devops/src/index.ts | 1 + 2 files changed, 6 insertions(+) diff --git a/plugins/azure-devops/api-report.md b/plugins/azure-devops/api-report.md index 6f3a148fb9..78880eb389 100644 --- a/plugins/azure-devops/api-report.md +++ b/plugins/azure-devops/api-report.md @@ -178,6 +178,11 @@ export const azureDevOpsPlugin: BackstagePlugin<{}, {}>; // @public (undocumented) export const AzureGitTagsIcon: (props: SvgIconProps) => JSX.Element; +// Warning: (ae-missing-release-tag) "AzurePipelinesIcon" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export const AzurePipelinesIcon: (props: SvgIconProps) => JSX.Element; + // Warning: (ae-missing-release-tag) "AzurePullRequestsIcon" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) diff --git a/plugins/azure-devops/src/index.ts b/plugins/azure-devops/src/index.ts index 1f66411d7b..def88f68c6 100644 --- a/plugins/azure-devops/src/index.ts +++ b/plugins/azure-devops/src/index.ts @@ -26,6 +26,7 @@ export { export { AzurePullRequestsIcon } from './components/AzurePullRequestsIcon'; export { AzureGitTagsIcon } from './components/AzureGitTagsIcon'; +export { AzurePipelinesIcon } from './components/AzurePipelinesIcon'; export * from './api'; export * from './hooks'; From b011a1052aa290c38847f86c7315507c9f69eaca Mon Sep 17 00:00:00 2001 From: Nick Marinelli Date: Fri, 17 Jun 2022 10:31:16 -0400 Subject: [PATCH 5/5] remove hooks and added icons Signed-off-by: Nick Marinelli --- plugins/azure-devops/api-report.md | 79 ------------------------------ plugins/azure-devops/src/index.ts | 3 -- 2 files changed, 82 deletions(-) diff --git a/plugins/azure-devops/api-report.md b/plugins/azure-devops/api-report.md index 78880eb389..b366166d95 100644 --- a/plugins/azure-devops/api-report.md +++ b/plugins/azure-devops/api-report.md @@ -16,7 +16,6 @@ import { GitTag } from '@backstage/plugin-azure-devops-common'; import { IdentityApi } from '@backstage/core-plugin-api'; import { PullRequest } from '@backstage/plugin-azure-devops-common'; import { PullRequestOptions } from '@backstage/plugin-azure-devops-common'; -import { PullRequestStatus } from '@backstage/plugin-azure-devops-common'; import { RepoBuild } from '@backstage/plugin-azure-devops-common'; import { RepoBuildOptions } from '@backstage/plugin-azure-devops-common'; import { SvgIconProps } from '@material-ui/core'; @@ -173,16 +172,6 @@ export class AzureDevOpsClient implements AzureDevOpsApi { // @public (undocumented) export const azureDevOpsPlugin: BackstagePlugin<{}, {}>; -// Warning: (ae-missing-release-tag) "AzureGitTagsIcon" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export const AzureGitTagsIcon: (props: SvgIconProps) => JSX.Element; - -// Warning: (ae-missing-release-tag) "AzurePipelinesIcon" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export const AzurePipelinesIcon: (props: SvgIconProps) => JSX.Element; - // Warning: (ae-missing-release-tag) "AzurePullRequestsIcon" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) @@ -349,73 +338,5 @@ export interface PullRequestColumnConfig { // @public (undocumented) export type PullRequestFilter = (pullRequest: DashboardPullRequest) => boolean; -// Warning: (ae-missing-release-tag) "useAllTeams" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export function useAllTeams(): { - teams?: Team[]; - loading: boolean; - error?: Error; -}; - -// Warning: (ae-missing-release-tag) "useDashboardPullRequests" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export function useDashboardPullRequests( - project?: string, - pollingInterval?: number, -): { - pullRequests?: DashboardPullRequest[]; - loading: boolean; - error?: Error; -}; - -// Warning: (ae-missing-release-tag) "useProjectRepoFromEntity" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export function useProjectRepoFromEntity(entity: Entity): { - project: string; - repo: string; -}; - -// Warning: (ae-missing-release-tag) "usePullRequests" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export function usePullRequests( - entity: Entity, - defaultLimit?: number, - requestedStatus?: PullRequestStatus, -): { - items?: PullRequest[]; - loading: boolean; - error?: Error; -}; - -// Warning: (ae-missing-release-tag) "useRepoBuilds" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export function useRepoBuilds( - entity: Entity, - defaultLimit?: number, -): { - items?: RepoBuild[]; - loading: boolean; - error?: Error; -}; - -// Warning: (ae-missing-release-tag) "useUserEmail" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export function useUserEmail(): string | undefined; - -// Warning: (ae-missing-release-tag) "useUserTeamIds" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export function useUserTeamIds(userId: string | undefined): { - teamIds?: string[]; - loading: boolean; - error?: Error; -}; - // (No @packageDocumentation comment for this package) ``` diff --git a/plugins/azure-devops/src/index.ts b/plugins/azure-devops/src/index.ts index def88f68c6..e65c1d02a3 100644 --- a/plugins/azure-devops/src/index.ts +++ b/plugins/azure-devops/src/index.ts @@ -25,11 +25,8 @@ export { } from './plugin'; export { AzurePullRequestsIcon } from './components/AzurePullRequestsIcon'; -export { AzureGitTagsIcon } from './components/AzureGitTagsIcon'; -export { AzurePipelinesIcon } from './components/AzurePipelinesIcon'; export * from './api'; -export * from './hooks'; export { FilterType } from './components/PullRequestsPage'; export type {