Skip to content

Commit 9cf00da

Browse files
sourcegraph-release-botBolajiOlajideChickensoupwithrice
authored
[Backport 5.5.x] fix(batches): the baseURL for github instance is now updated when creating a GitHub app (sourcegraph#63833)
Closes SRCH-723 The baseURL for GitHub apps defaults to `https://github.com` when no `externalServiceURL`, we somehow missed this during our testing. ![CleanShot 2024-07-12 at 11 57 00@2x](https://github.com/user-attachments/assets/99b68a11-de38-4a2d-8c4c-3219f0c9abf7) ## Test plan Manual testing with the GHE instance. ## Changelog <br> Backport 1c40c9e from sourcegraph#63803 Co-authored-by: Bolaji Olajide <[email protected]> Co-authored-by: Anish Lakhwara <[email protected]>
1 parent 6b8d334 commit 9cf00da

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

client/web/src/enterprise/batches/settings/AddCredentialModal.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,7 @@ const AddToken: FC<AddTokenProps> = ({
383383
authenticatedUser={user as unknown as AuthenticatedUser}
384384
minimizedMode={true}
385385
kind={kind}
386+
externalServiceURL={externalServiceURL}
386387
/>
387388
)}
388389
</>

client/web/src/enterprise/batches/settings/BatchChangesCreateGitHubAppPage.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,18 @@ interface BatchChangesCreateGitHubAppPageProps {
2323
authenticatedUser: AuthenticatedUser
2424
minimizedMode?: boolean
2525
kind: GitHubAppKind
26+
externalServiceURL?: string
2627
}
2728

2829
export const BatchChangesCreateGitHubAppPage: FC<BatchChangesCreateGitHubAppPageProps> = ({
2930
minimizedMode,
3031
kind,
3132
authenticatedUser,
33+
externalServiceURL,
3234
}) => {
3335
const location = useLocation()
3436
const searchParams = new URLSearchParams(location.search)
35-
const baseURL = searchParams.get('baseURL')
37+
const baseURL = externalServiceURL || searchParams.get('baseURL')
3638

3739
const isGitHubAppKindCredential = kind === GitHubAppKind.USER_CREDENTIAL || kind === GitHubAppKind.SITE_CREDENTIAL
3840

0 commit comments

Comments
 (0)