Merge pull request #33962 from backstage/rugvip/remove-unused-getgithubintegrationconfig

catalog-import: 🧹
This commit is contained in:
Patrik Oldsberg
2026-04-17 13:07:27 +02:00
committed by GitHub
2 changed files with 6 additions and 21 deletions
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-import': patch
---
Internal refactor
+1 -21
View File
@@ -14,11 +14,7 @@
* limitations under the License.
*/
import {
GithubIntegrationConfig,
ScmIntegrationRegistry,
} from '@backstage/integration';
import parseGitUrl from 'git-url-parse';
import { GithubIntegrationConfig } from '@backstage/integration';
import { ScmAuthApi } from '@backstage/integration-react';
import { Octokit } from '@octokit/rest';
import { getBranchName, getCatalogFilename } from '../components/helpers';
@@ -34,22 +30,6 @@ export interface GitHubOptions {
repositoryUrl: string;
githubIntegrationConfig: GithubIntegrationConfig;
}
export const getGithubIntegrationConfig = (
scmIntegrationsApi: ScmIntegrationRegistry,
location: string,
) => {
const integration = scmIntegrationsApi.github.byUrl(location);
if (!integration) {
return undefined;
}
const { name: repo, owner } = parseGitUrl(location);
return {
repo,
owner,
githubIntegrationConfig: integration.config,
};
};
export async function submitGitHubPrToRepo(
options: GitHubOptions,