Skip to content

Commit 8e2d4cc

Browse files
committed
fix(management): point release checks to fork repositories
Use the NGLSL backend and management-center release feeds for version checks and panel updates, and lock the defaults in regression tests.
1 parent 4284918 commit 8e2d4cc

File tree

4 files changed

+23
-2
lines changed

4 files changed

+23
-2
lines changed

internal/api/handlers/management/api_tools_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,3 +210,12 @@ func TestAuthByIndexDistinguishesSharedAPIKeysAcrossProviders(t *testing.T) {
210210
t.Fatalf("authByIndex(compat) returned %q, want %q", gotCompat.ID, compatAuth.ID)
211211
}
212212
}
213+
214+
func TestLatestReleaseURLPointsToForkRepository(t *testing.T) {
215+
t.Parallel()
216+
217+
const want = "https://api.github.com/repos/NGLSL/CLIProxyAPI/releases/latest"
218+
if latestReleaseURL != want {
219+
t.Fatalf("latestReleaseURL = %q, want %q", latestReleaseURL, want)
220+
}
221+
}

internal/api/handlers/management/config_basic.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
)
2020

2121
const (
22-
latestReleaseURL = "https://api.github.com/repos/router-for-me/CLIProxyAPI/releases/latest"
22+
latestReleaseURL = "https://api.github.com/repos/NGLSL/CLIProxyAPI/releases/latest"
2323
latestReleaseUserAgent = "CLIProxyAPI"
2424
)
2525

internal/managementasset/updater.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
)
2626

2727
const (
28-
defaultManagementReleaseURL = "https://api.github.com/repos/router-for-me/Cli-Proxy-API-Management-Center/releases/latest"
28+
defaultManagementReleaseURL = "https://api.github.com/repos/NGLSL/Cli-Proxy-API-Management-Center/releases/latest"
2929
defaultManagementFallbackURL = "https://cpamc.router-for.me/"
3030
managementAssetName = "management.html"
3131
httpUserAgent = "CLIProxyAPI-management-updater"
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package managementasset
2+
3+
import "testing"
4+
5+
func TestResolveReleaseURLDefaultsToForkManagementRepository(t *testing.T) {
6+
t.Parallel()
7+
8+
const want = "https://api.github.com/repos/NGLSL/Cli-Proxy-API-Management-Center/releases/latest"
9+
if got := resolveReleaseURL(""); got != want {
10+
t.Fatalf("resolveReleaseURL(\"\") = %q, want %q", got, want)
11+
}
12+
}

0 commit comments

Comments
 (0)