Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Commit

Permalink
[Backport 5.5.x] fix(batches): the baseURL for github instance is now…
Browse files Browse the repository at this point in the history
… 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.

![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 #63803

Co-authored-by: Bolaji Olajide <[email protected]>
Co-authored-by: Anish Lakhwara <[email protected]>
  • Loading branch information
3 people authored Jul 17, 2024
1 parent 6b8d334 commit 9cf00da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@ const AddToken: FC<AddTokenProps> = ({
authenticatedUser={user as unknown as AuthenticatedUser}
minimizedMode={true}
kind={kind}
externalServiceURL={externalServiceURL}
/>
)}
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 9cf00da

Please sign in to comment.