mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 17:11:49 +00:00
[Backport 5.5.x] fix(batches): the baseURL for github instance is now updated when creating a GitHub app (#63833)
Closes SRCH-723
The baseURL for GitHub apps defaults to `https://github.com` when no
`externalServiceURL`, we somehow missed this during our testing.

## Test plan
Manual testing with the GHE instance.
## Changelog
<br> Backport 1c40c9e5bc from #63803
Co-authored-by: Bolaji Olajide <25608335+BolajiOlajide@users.noreply.github.com>
Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com>
This commit is contained in:
parent
6b8d334563
commit
9cf00da25a
@ -383,6 +383,7 @@ const AddToken: FC<AddTokenProps> = ({
|
||||
authenticatedUser={user as unknown as AuthenticatedUser}
|
||||
minimizedMode={true}
|
||||
kind={kind}
|
||||
externalServiceURL={externalServiceURL}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
|
||||
@ -23,16 +23,18 @@ interface BatchChangesCreateGitHubAppPageProps {
|
||||
authenticatedUser: AuthenticatedUser
|
||||
minimizedMode?: boolean
|
||||
kind: GitHubAppKind
|
||||
externalServiceURL?: string
|
||||
}
|
||||
|
||||
export const BatchChangesCreateGitHubAppPage: FC<BatchChangesCreateGitHubAppPageProps> = ({
|
||||
minimizedMode,
|
||||
kind,
|
||||
authenticatedUser,
|
||||
externalServiceURL,
|
||||
}) => {
|
||||
const location = useLocation()
|
||||
const searchParams = new URLSearchParams(location.search)
|
||||
const baseURL = searchParams.get('baseURL')
|
||||
const baseURL = externalServiceURL || searchParams.get('baseURL')
|
||||
|
||||
const isGitHubAppKindCredential = kind === GitHubAppKind.USER_CREDENTIAL || kind === GitHubAppKind.SITE_CREDENTIAL
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user