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/report.api.md b/packages/integration/report.api.md index c85db9306b..fc38853029 100644 --- a/packages/integration/report.api.md +++ b/packages/integration/report.api.md @@ -647,7 +647,7 @@ export type GiteaIntegrationConfig = { export type GithubAppConfig = { appId: number; privateKey: string; - webhookSecret: string; + webhookSecret?: string; clientId: string; clientSecret: string; allowedInstallationOwners?: string[]; 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',