Deprecate packages

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2024-04-18 20:45:37 +02:00
parent 602c2bea1b
commit d6aaf01c1f
3 changed files with 11 additions and 85 deletions
+2 -83
View File
@@ -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 = (
<Grid container spacing={3} alignItems="stretch">
// ...
<Grid item>
<EntityCodeClimateCard />
</Grid>
// ...
</Grid>
);
```
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.
+4 -2
View File
@@ -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."
}