@fabrika/github-app 0.4.1 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fabrika/github-app",
3
- "version": "0.4.1",
3
+ "version": "0.4.3",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
package/src/manifest.ts CHANGED
@@ -23,6 +23,7 @@ export function buildGitHubAppManifest(input: GitHubAppManifestInput): Readonly<
23
23
  url: input.homepageUrl,
24
24
  hook_attributes: { url: input.webhookUrl, active: true },
25
25
  ...(input.redirectUrl === undefined ? {} : { redirect_url: input.redirectUrl }),
26
+ ...(input.setupUrl === undefined ? {} : { setup_url: input.setupUrl, setup_on_update: true }),
26
27
  public: input.public,
27
28
  default_permissions: { contents: 'write', pull_requests: 'write', metadata: 'read' },
28
29
  default_events: ['push'],
@@ -185,6 +186,7 @@ function validateManifestInput(input: GitHubAppManifestInput): void {
185
186
  validateManifestUrl(input.homepageUrl)
186
187
  validateManifestUrl(input.webhookUrl)
187
188
  if (input.redirectUrl !== undefined) validateManifestUrl(input.redirectUrl)
189
+ if (input.setupUrl !== undefined) validateManifestUrl(input.setupUrl)
188
190
  }
189
191
 
190
192
  function validateManifestUrl(value: string): void {
package/src/types.ts CHANGED
@@ -76,6 +76,8 @@ export interface GitHubAppManifestInput {
76
76
  readonly homepageUrl: string
77
77
  readonly webhookUrl: string
78
78
  readonly redirectUrl?: string
79
+ /** Where GitHub sends the installer after an install or an installation update, with `installation_id` and `setup_action`. */
80
+ readonly setupUrl?: string
79
81
  /** GitHub requires a public App when repositories outside its owner organization need it. */
80
82
  readonly public: boolean
81
83
  }