fix: include app owner in GitHub App URL for GHE Cloud (#8846)

* fix: include app owner in GitHub App installation URL for GHE Cloud

GHE Cloud custom domains (*.ghe.com) require the owner (org/user) in
the app installation URL path: /apps/{owner}/{slug}/installations/new.
Adds an optional app_owner field to the GHES app config.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: update ee-repo-ref.txt

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: update ee-repo-ref to 2c2b8dc99689f54b8cd916fb9472fd5698b09478

This commit updates the EE repository reference after PR #539 was merged in windmill-ee-private.

Previous ee-repo-ref: 40dd503d8c563ff93fd2ee3fd8830a5b1c4428d2

New ee-repo-ref: 2c2b8dc99689f54b8cd916fb9472fd5698b09478

Automated by sync-ee-ref workflow.

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
This commit is contained in:
Alexander Petric
2026-04-17 16:21:35 +02:00
committed by GitHub
parent 1443d3562c
commit e9ea06f4c2
4 changed files with 27 additions and 2 deletions
+1 -1
View File
@@ -1 +1 @@
a28f3509d0aa7c0e17fa6dcb1d03d935a7a2a11c
2c2b8dc99689f54b8cd916fb9472fd5698b09478
+3
View File
@@ -2447,6 +2447,9 @@ paths:
type: string
client_id:
type: string
app_owner:
type: string
nullable: true
required:
- base_url
- app_slug
@@ -152,6 +152,23 @@
bind:value={$values['github_enterprise_app'].client_id}
/>
</div>
<div class="flex flex-col gap-1">
<label for="ghes_app_owner" class="block text-xs font-semibold text-emphasis mb-1">
App owner
</label>
<TextInput
inputProps={{
type: 'text',
id: 'ghes_app_owner',
placeholder: 'my-org',
disabled: fieldsDisabled
}}
bind:value={$values['github_enterprise_app'].app_owner}
/>
<span class="text-2xs text-secondary">
Organization or user that owns the GitHub App. Required for GHE Cloud (*.ghe.com) domains.
</span>
</div>
</div>
<div class="flex flex-col gap-1">
+6 -1
View File
@@ -142,7 +142,12 @@ export async function loadGithubInstallations(
const hostname = new URL(ghesBaseUrl).hostname
const isGHES = hostname !== 'github.com' && !hostname.endsWith('.ghe.com')
const appsPath = isGHES ? 'github-apps' : 'apps'
state.githubInstallationUrl = `${ghesBaseUrl}/${appsPath}/${ghesConfig.app_slug}/installations/new?state=${stateParam}`
// GHE Cloud (*.ghe.com) requires the app owner (org/user) in the URL path
const appPath =
hostname.endsWith('.ghe.com') && ghesConfig.app_owner
? `${ghesConfig.app_owner}/${ghesConfig.app_slug}`
: ghesConfig.app_slug
state.githubInstallationUrl = `${ghesBaseUrl}/${appsPath}/${appPath}/installations/new?state=${stateParam}`
} else {
state.githubInstallationUrl = `https://github.com/apps/windmill-sync-helper/installations/new?state=${stateParam}`
}