From 9768992a4e0cac77da1cc368c9686f615abc81f4 Mon Sep 17 00:00:00 2001 From: djamaile Date: Wed, 26 Mar 2025 11:22:53 +0100 Subject: [PATCH] fix: mark github webhookSecret as optional Signed-off-by: djamaile --- .changeset/stale-tables-stick.md | 5 +++++ packages/integration/config.d.ts | 2 +- packages/integration/src/github/config.ts | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 .changeset/stale-tables-stick.md diff --git a/.changeset/stale-tables-stick.md b/.changeset/stale-tables-stick.md new file mode 100644 index 0000000000..bea1c3361b --- /dev/null +++ b/.changeset/stale-tables-stick.md @@ -0,0 +1,5 @@ +--- +'@backstage/integration': patch +--- + +Mark GitHub `webhookSecret` config property as optional. A `webhookSecret` is not required when creating a GitHub App. diff --git a/packages/integration/config.d.ts b/packages/integration/config.d.ts index bd5267ab3d..8205e0c71e 100644 --- a/packages/integration/config.d.ts +++ b/packages/integration/config.d.ts @@ -239,7 +239,7 @@ export interface Config { * The secret used for webhooks * @visibility secret */ - webhookSecret: string; + webhookSecret?: string; /** * The client ID to use */ diff --git a/packages/integration/src/github/config.ts b/packages/integration/src/github/config.ts index 1ff4779be2..74a0267d62 100644 --- a/packages/integration/src/github/config.ts +++ b/packages/integration/src/github/config.ts @@ -92,7 +92,7 @@ export type GithubAppConfig = { /** * Webhook secret can be configured at https://github.com/organizations/$org/settings/apps/$AppName */ - webhookSecret: string; + webhookSecret?: string; /** * Found at https://github.com/organizations/$org/settings/apps/$AppName */ @@ -128,7 +128,7 @@ export function readGithubIntegrationConfig( appId: c.getNumber('appId'), clientId: c.getString('clientId'), clientSecret: c.getString('clientSecret'), - webhookSecret: c.getString('webhookSecret'), + webhookSecret: c.getOptionalString('webhookSecret'), privateKey: c.getString('privateKey'), allowedInstallationOwners: c.getOptionalStringArray( 'allowedInstallationOwners',