fix(github): preserve custom app API URLs

This commit is contained in:
Andras Bacsai
2026-07-03 12:01:16 +02:00
parent a7dddccd2e
commit 1adeed2a48
6 changed files with 101 additions and 25 deletions
@@ -419,7 +419,7 @@ describe('GitHub Source Change Component', function () {
expect($githubApp->private_key_id)->toBe($privateKey->id);
});
test('normalizes resolvable ghe dot com api url when saving github app settings', function () {
test('preserves custom ghe api url when saving github app settings', function () {
$githubApp = GithubApp::create([
'name' => 'Test GitHub App',
'api_url' => 'https://github.ghe.com/api/v3',
@@ -437,10 +437,10 @@ describe('GitHub Source Change Component', function () {
->set('apiUrl', 'https://github.ghe.com/api/v3')
->call('submit')
->assertDispatched('success')
->assertSet('apiUrl', 'https://api.github.ghe.com');
->assertSet('apiUrl', 'https://github.ghe.com/api/v3');
$githubApp->refresh();
expect($githubApp->api_url)->toBe('https://api.github.ghe.com');
expect($githubApp->api_url)->toBe('https://github.ghe.com/api/v3');
});
test('rejects invalid github organization values', function () {