From be1014d2294f8a7922741e9d79946bf039e01b51 Mon Sep 17 00:00:00 2001 From: Andre Wanlin Date: Fri, 7 Jun 2024 19:47:06 -0500 Subject: [PATCH 1/4] Removed deprecated `GitHub` cased code Signed-off-by: Andre Wanlin --- .changeset/nasty-roses-flash.md | 12 ++++ packages/integration/src/github/deprecated.ts | 71 ------------------- 2 files changed, 12 insertions(+), 71 deletions(-) create mode 100644 .changeset/nasty-roses-flash.md delete mode 100644 packages/integration/src/github/deprecated.ts diff --git a/.changeset/nasty-roses-flash.md b/.changeset/nasty-roses-flash.md new file mode 100644 index 0000000000..50ac7f2e50 --- /dev/null +++ b/.changeset/nasty-roses-flash.md @@ -0,0 +1,12 @@ +--- +'@backstage/integration': patch +--- + +**BREAKING** Removed deprecated code from when casing was changed from `GitHub` to `Github` nearly two years ago. The following items have been removed: + +- `getGitHubFileFetchUrl` (use `getGithubFileFetchUrl` instead) +- `GitHubIntegrationConfig` (use `GithubIntegrationConfig` instead) +- `GitHubIntegration` (use `GithubIntegration` instead) +- `readGitHubIntegrationConfig` (use `readGithubIntegrationConfig` instead) +- `readGitHubIntegrationConfigs` (use `readGithubIntegrationConfigs` instead) +- `replaceGitHubUrlType` (use `replaceGithubUrlType` instead) diff --git a/packages/integration/src/github/deprecated.ts b/packages/integration/src/github/deprecated.ts deleted file mode 100644 index 127040c1a7..0000000000 --- a/packages/integration/src/github/deprecated.ts +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2022 The Backstage Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { - GithubIntegrationConfig, - readGithubIntegrationConfig, - readGithubIntegrationConfigs, -} from './config'; -import { getGithubFileFetchUrl } from './core'; -import { GithubIntegration, replaceGithubUrlType } from './GithubIntegration'; -import { ScmIntegrationsFactory } from '../types'; - -/** - * @public - * @deprecated Use {@link getGithubFileFetchUrl} instead. - */ -export const getGitHubFileFetchUrl = getGithubFileFetchUrl; - -/** - * @public - * @deprecated Use {@link GithubIntegrationConfig} instead. - */ -export type GitHubIntegrationConfig = GithubIntegrationConfig; - -/** - * @public - * @deprecated Use {@link GithubIntegration} instead. - */ -export class GitHubIntegration extends GithubIntegration { - static factory: ScmIntegrationsFactory = - GithubIntegration.factory; - - constructor(integrationConfig: GitHubIntegrationConfig) { - super(integrationConfig as GithubIntegrationConfig); - } - - get config(): GitHubIntegrationConfig { - return super.config as GitHubIntegrationConfig; - } -} - -/** - * @public - * @deprecated Use {@link readGithubIntegrationConfig} instead. - */ -export const readGitHubIntegrationConfig = readGithubIntegrationConfig; - -/** - * @public - * @deprecated Use {@link readGithubIntegrationConfigs} instead. - */ -export const readGitHubIntegrationConfigs = readGithubIntegrationConfigs; - -/** - * @public - * @deprecated Use {@link replaceGithubUrlType} instead. - */ -export const replaceGitHubUrlType = replaceGithubUrlType; From 3e0124dff2065fc5df8c5864b91fcb43e760f3d4 Mon Sep 17 00:00:00 2001 From: Andre Wanlin Date: Sat, 8 Jun 2024 11:50:47 -0500 Subject: [PATCH 2/4] Removed export Signed-off-by: Andre Wanlin --- packages/integration/src/github/index.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/integration/src/github/index.ts b/packages/integration/src/github/index.ts index 816b0d2ff9..ea6f18f2e0 100644 --- a/packages/integration/src/github/index.ts +++ b/packages/integration/src/github/index.ts @@ -31,5 +31,3 @@ export type { GithubCredentialType, } from './types'; export { GithubIntegration, replaceGithubUrlType } from './GithubIntegration'; - -export * from './deprecated'; From 254209fa7ea64ebf95d45311d75384e4734bdc53 Mon Sep 17 00:00:00 2001 From: Andre Wanlin Date: Sun, 9 Jun 2024 15:21:24 -0500 Subject: [PATCH 3/4] Updated API Report Signed-off-by: Andre Wanlin --- packages/integration/api-report.md | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/packages/integration/api-report.md b/packages/integration/api-report.md index 4945847751..ef2247c2de 100644 --- a/packages/integration/api-report.md +++ b/packages/integration/api-report.md @@ -479,9 +479,6 @@ export function getGiteaRequestOptions(config: GiteaIntegrationConfig): { headers?: Record; }; -// @public @deprecated (undocumented) -export const getGitHubFileFetchUrl: typeof getGithubFileFetchUrl; - // @public export function getGithubFileFetchUrl( url: string, @@ -604,15 +601,6 @@ export interface GithubCredentialsProvider { // @public export type GithubCredentialType = 'app' | 'token'; -// @public @deprecated (undocumented) -export class GitHubIntegration extends GithubIntegration { - constructor(integrationConfig: GitHubIntegrationConfig); - // (undocumented) - get config(): GitHubIntegrationConfig; - // (undocumented) - static factory: ScmIntegrationsFactory; -} - // @public export class GithubIntegration implements ScmIntegration { constructor(integrationConfig: GithubIntegrationConfig); @@ -636,9 +624,6 @@ export class GithubIntegration implements ScmIntegration { get type(): string; } -// @public @deprecated (undocumented) -export type GitHubIntegrationConfig = GithubIntegrationConfig; - // @public export type GithubIntegrationConfig = { host: string; @@ -877,17 +862,11 @@ export function readGerritIntegrationConfigs( // @public export function readGiteaConfig(config: Config): GiteaIntegrationConfig; -// @public @deprecated (undocumented) -export const readGitHubIntegrationConfig: typeof readGithubIntegrationConfig; - // @public export function readGithubIntegrationConfig( config: Config, ): GithubIntegrationConfig; -// @public @deprecated (undocumented) -export const readGitHubIntegrationConfigs: typeof readGithubIntegrationConfigs; - // @public export function readGithubIntegrationConfigs( configs: Config[], @@ -911,9 +890,6 @@ export function readGoogleGcsIntegrationConfig( // @public export function readHarnessConfig(config: Config): HarnessIntegrationConfig; -// @public @deprecated (undocumented) -export const replaceGitHubUrlType: typeof replaceGithubUrlType; - // @public export function replaceGithubUrlType( url: string, From 0d12b9e85b704186ae7fb616cec4686c93023a08 Mon Sep 17 00:00:00 2001 From: Andre Wanlin <67169551+awanlin@users.noreply.github.com> Date: Mon, 10 Jun 2024 11:17:40 -0500 Subject: [PATCH 4/4] Update .changeset/nasty-roses-flash.md Co-authored-by: Vincenzo Scamporlino Signed-off-by: Andre Wanlin <67169551+awanlin@users.noreply.github.com> --- .changeset/nasty-roses-flash.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/nasty-roses-flash.md b/.changeset/nasty-roses-flash.md index 50ac7f2e50..4c09a7e47f 100644 --- a/.changeset/nasty-roses-flash.md +++ b/.changeset/nasty-roses-flash.md @@ -1,5 +1,5 @@ --- -'@backstage/integration': patch +'@backstage/integration': minor --- **BREAKING** Removed deprecated code from when casing was changed from `GitHub` to `Github` nearly two years ago. The following items have been removed: