chore(events,catalog/github): update docs from review comment
Signed-off-by: Rogerio Angeliski <angeliski@hotmail.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
'@backstage/plugin-catalog-backend-module-github': patch
|
||||
---
|
||||
|
||||
Handle Github `push` events at the `GithubEntityProvider` by subscribing to the topic `github.push.`
|
||||
Handle GitHub `push` events at the `GithubEntityProvider` by subscribing to the topic `github.push.`
|
||||
|
||||
Implements `EventSubscriber` to receive events for the topic `github.push`.
|
||||
|
||||
@@ -10,7 +10,5 @@ On `github.push`, the affected repository will be refreshed.
|
||||
This includes adding new Location entities, refreshing existing ones,
|
||||
and removing obsolete ones.
|
||||
|
||||
**Installation and Migration**
|
||||
|
||||
Please find more information at
|
||||
https://backstage.io/docs/integrations/github/discovery#installation-with-events-support
|
||||
|
||||
@@ -69,7 +69,6 @@ Set up your provider
|
||||
|
||||
```diff
|
||||
// packages/backend/src/plugins/catalogEventBasedProviders.ts
|
||||
+import { CatalogClient } from '@backstage/catalog-client';
|
||||
+import { GithubEntityProvider } from '@backstage/plugin-catalog-backend-module-github';
|
||||
import { EntityProvider } from '@backstage/plugin-catalog-node';
|
||||
import { EventSubscriber } from '@backstage/plugin-events-node';
|
||||
@@ -98,6 +97,8 @@ Set up your provider
|
||||
}
|
||||
```
|
||||
|
||||
You can check the official docs to [configure your webhook](https://docs.github.com/en/developers/webhooks-and-events/webhooks/creating-webhooks) and to [secure your request]https://docs.github.com/en/developers/webhooks-and-events/webhooks/securing-your-webhooks()
|
||||
|
||||
## Configuration
|
||||
|
||||
To use the discovery provider, you'll need a GitHub integration
|
||||
|
||||
@@ -53,7 +53,7 @@ type Repository = {
|
||||
url: string;
|
||||
isArchived: boolean;
|
||||
repositoryTopics: string[];
|
||||
defaultBranchRef: string | null;
|
||||
defaultBranchRef?: string;
|
||||
isCatalogInfoFilePresent: boolean;
|
||||
};
|
||||
|
||||
@@ -213,7 +213,7 @@ export class GithubEntityProvider implements EntityProvider, EventSubscriber {
|
||||
return {
|
||||
url: r.url,
|
||||
name: r.name,
|
||||
defaultBranchRef: r.defaultBranchRef?.name || null,
|
||||
defaultBranchRef: r.defaultBranchRef?.name,
|
||||
repositoryTopics: r.repositoryTopics.nodes.map(t => t.topic.name),
|
||||
isArchived: r.isArchived,
|
||||
isCatalogInfoFilePresent:
|
||||
|
||||
Reference in New Issue
Block a user