Merge pull request #25100 from awanlin/topic/remove-deprecated-github-code

Removed deprecated `GitHub` cased code
This commit is contained in:
Ben Lambert
2024-06-11 11:55:47 +02:00
committed by GitHub
4 changed files with 12 additions and 97 deletions
+12
View File
@@ -0,0 +1,12 @@
---
'@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:
- `getGitHubFileFetchUrl` (use `getGithubFileFetchUrl` instead)
- `GitHubIntegrationConfig` (use `GithubIntegrationConfig` instead)
- `GitHubIntegration` (use `GithubIntegration` instead)
- `readGitHubIntegrationConfig` (use `readGithubIntegrationConfig` instead)
- `readGitHubIntegrationConfigs` (use `readGithubIntegrationConfigs` instead)
- `replaceGitHubUrlType` (use `replaceGithubUrlType` instead)
-24
View File
@@ -480,9 +480,6 @@ export function getGiteaRequestOptions(config: GiteaIntegrationConfig): {
headers?: Record<string, string>;
};
// @public @deprecated (undocumented)
export const getGitHubFileFetchUrl: typeof getGithubFileFetchUrl;
// @public
export function getGithubFileFetchUrl(
url: string,
@@ -605,15 +602,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<GitHubIntegration>;
}
// @public
export class GithubIntegration implements ScmIntegration {
constructor(integrationConfig: GithubIntegrationConfig);
@@ -637,9 +625,6 @@ export class GithubIntegration implements ScmIntegration {
get type(): string;
}
// @public @deprecated (undocumented)
export type GitHubIntegrationConfig = GithubIntegrationConfig;
// @public
export type GithubIntegrationConfig = {
host: string;
@@ -878,17 +863,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[],
@@ -912,9 +891,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,
@@ -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> =
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;
-2
View File
@@ -31,5 +31,3 @@ export type {
GithubCredentialType,
} from './types';
export { GithubIntegration, replaceGithubUrlType } from './GithubIntegration';
export * from './deprecated';