From d6aaf01c1f1c8046e264202ca477b0b63b098715 Mon Sep 17 00:00:00 2001 From: blam Date: Thu, 18 Apr 2024 20:45:37 +0200 Subject: [PATCH] Deprecate packages Signed-off-by: blam --- .changeset/migrate-1713465935674.md | 5 ++ plugins/code-climate/README.md | 85 +---------------------------- plugins/code-climate/package.json | 6 +- 3 files changed, 11 insertions(+), 85 deletions(-) create mode 100644 .changeset/migrate-1713465935674.md diff --git a/.changeset/migrate-1713465935674.md b/.changeset/migrate-1713465935674.md new file mode 100644 index 0000000000..7d1db8520e --- /dev/null +++ b/.changeset/migrate-1713465935674.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-code-climate': patch +--- + +These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. diff --git a/plugins/code-climate/README.md b/plugins/code-climate/README.md index 8aff5cd9af..6a66585378 100644 --- a/plugins/code-climate/README.md +++ b/plugins/code-climate/README.md @@ -1,84 +1,3 @@ -# Code Climate Plugin +# Deprecated -The Code Climate Plugin displays a few stats from the quality section from [Code Climate](https://codeclimate.com). - -![Code Climate Card](./docs/code-climate-card.png) - -## Getting Started - -1. Install the Code Climate Plugin: - -```bash -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-code-climate -``` - -2. Add the `EntityCodeClimateCard` to the EntityPage: - -```jsx -// packages/app/src/components/catalog/EntityPage.tsx - -import { EntityCodeClimateCard } from '@backstage/plugin-code-climate'; - -const overviewContent = ( - - // ... - - - - // ... - -); -``` - -3. Add the proxy config: - -```yaml -# app-config.yaml - -proxy: - '/codeclimate/api': - target: https://api.codeclimate.com/v1 - headers: - Authorization: Token token=${CODECLIMATE_TOKEN} -``` - -4. Create a new API access token (https://codeclimate.com/profile/tokens) and provide `CODECLIMATE_TOKEN` as an env variable. - -5. Add the `codeclimate.com/repo-id` annotation to your `catalog-info.yaml` file: - -```yaml -apiVersion: backstage.io/v1alpha1 -kind: Component -metadata: - name: backstage - description: | - Backstage is an open-source developer portal that puts the developer experience first. - annotations: - codeclimate.com/repo-id: YOUR_REPO_ID -spec: - type: library - owner: CNCF - lifecycle: experimental -``` - -### Demo Mode - -The plugin provides a MockAPI that always returns dummy data instead of talking to the Code Climate backend. -You can add it by overriding the `codeClimateApiRef`: - -```ts -// packages/app/src/apis.ts - -import { createApiFactory } from '@backstage/core-plugin-api'; -import { - MockCodeClimateApi, - codeClimateApiRef, -} from '@backstage/plugin-code-climate'; - -export const apis = [ - // ... - - createApiFactory(codeClimateApiRef, new MockCodeClimateApi()), -]; -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-code-climate` instead. diff --git a/plugins/code-climate/package.json b/plugins/code-climate/package.json index 2c67c7e8f9..fea40117aa 100644 --- a/plugins/code-climate/package.json +++ b/plugins/code-climate/package.json @@ -2,7 +2,8 @@ "name": "@backstage/plugin-code-climate", "version": "0.1.34", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-code-climate" }, "publishConfig": { "access": "public", @@ -56,5 +57,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-code-climate instead." }