Skip to content

Commit 00cdba0

Browse files
authored
Merge pull request #245 from bugsnag/release/v3.5.1
v3.5.1 Release
2 parents c5dcfa3 + fdddf67 commit 00cdba0

File tree

6 files changed

+28
-21
lines changed

6 files changed

+28
-21
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## [3.5.1] - 2025-11-13
4+
5+
### Changed
6+
7+
- Update the default URLs for the secondary endpoints [#244](https://github.com/bugsnag/bugsnag-cli/pull/244)
8+
39
## [3.5.0] - 2025-11-12
410

511
### Added

install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ display_help() {
9191
EOS
9292
}
9393

94-
VERSION="3.5.0"
94+
VERSION="3.5.1"
9595

9696
while [[ "$#" -gt 0 ]]; do
9797
case "$1" in

js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@bugsnag/cli",
3-
"version": "3.5.0",
3+
"version": "3.5.1",
44
"description": "BugSnag CLI",
55
"main": "dist/bugsnag-cli-wrapper.js",
66
"types": "dist/bugsnag-cli-wrapper.d.ts",

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"github.com/bugsnag/bugsnag-cli/pkg/upload"
1212
)
1313

14-
var package_version = "3.5.0"
14+
var package_version = "3.5.1"
1515

1616
func main() {
1717
commands := options.CLI{}

pkg/endpoints/endpoints.go

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@ package endpoints
22

33
import (
44
"fmt"
5-
"github.com/bugsnag/bugsnag-cli/pkg/options"
65
"net/url"
76
"strings"
7+
8+
"github.com/bugsnag/bugsnag-cli/pkg/options"
89
)
910

1011
// Constants defining upload and build endpoint instances.
1112
const (
12-
HUB_PREFIX = "00000" // API keys starting with this indicate usage of the Hub instance.
13-
HUB_UPLOAD = "https://upload.insighthub.smartbear.com"
14-
HUB_BUILD = "https://build.insighthub.smartbear.com"
15-
BUGSNAG_UPLOAD = "https://upload.bugsnag.com"
16-
BUGSNAG_BUILD = "https://build.bugsnag.com"
13+
SECONDARY_API_PREFIX = "00000" // API keys starting with this indicate usage of the secondary instance.
14+
SECONDARY_UPLOAD_ENDPOINT = "https://upload.bugsnag.smartbear.com"
15+
SECONDARY_BUILD_ENDPOINT = "https://build.bugsnag.smartbear.com"
16+
PRIMARY_UPLOAD_ENDPOINT = "https://upload.bugsnag.com"
17+
PRIMARY_BUILD_ENDPOINT = "https://build.bugsnag.com"
1718
)
1819

1920
// BuildEndpointURL constructs a complete URL from a base URI and optional port.
@@ -63,10 +64,10 @@ func GetDefaultUploadEndpoint(apiKey string, endpointPath string, options option
6364

6465
if options.Upload.UploadAPIRootUrl != "" {
6566
endpoint = options.Upload.UploadAPIRootUrl
66-
} else if strings.HasPrefix(apiKey, HUB_PREFIX) {
67-
endpoint = HUB_UPLOAD
67+
} else if strings.HasPrefix(apiKey, SECONDARY_API_PREFIX) {
68+
endpoint = SECONDARY_UPLOAD_ENDPOINT
6869
} else {
69-
endpoint = BUGSNAG_UPLOAD
70+
endpoint = PRIMARY_UPLOAD_ENDPOINT
7071
}
7172

7273
endpoint, err := BuildEndpointURL(endpoint+endpointPath, options.Port)
@@ -95,10 +96,10 @@ func GetDefaultBuildEndpoint(apiKey string, options options.CLI) (string, error)
9596

9697
if options.CreateBuild.BuildApiRootUrl != "" {
9798
endpoint = options.CreateBuild.BuildApiRootUrl
98-
} else if strings.HasPrefix(apiKey, HUB_PREFIX) {
99-
endpoint = HUB_BUILD
99+
} else if strings.HasPrefix(apiKey, SECONDARY_API_PREFIX) {
100+
endpoint = SECONDARY_BUILD_ENDPOINT
100101
} else {
101-
endpoint = BUGSNAG_BUILD
102+
endpoint = PRIMARY_BUILD_ENDPOINT
102103
}
103104

104105
endpoint, err := BuildEndpointURL(endpoint, options.Port)

test/endpoints/endpoint_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,14 @@ func TestGetDefaultUploadEndpoint(t *testing.T) {
7272
}{
7373
{
7474
name: "Uses InsightHub endpoint with HUB prefix",
75-
apiKey: endpoints.HUB_PREFIX + "123",
75+
apiKey: endpoints.SECONDARY_API_PREFIX + "123",
7676
endpointPath: "/upload",
7777
options: options.CLI{
7878
Globals: options.Globals{
7979
Port: 9999,
8080
},
8181
},
82-
expectPrefix: endpoints.HUB_UPLOAD + ":9999/upload",
82+
expectPrefix: endpoints.SECONDARY_UPLOAD_ENDPOINT + ":9999/upload",
8383
},
8484
{
8585
name: "Uses Bugsnag endpoint with non-HUB key",
@@ -90,7 +90,7 @@ func TestGetDefaultUploadEndpoint(t *testing.T) {
9090
Port: 0,
9191
},
9292
},
93-
expectPrefix: endpoints.BUGSNAG_UPLOAD + "/upload",
93+
expectPrefix: endpoints.PRIMARY_UPLOAD_ENDPOINT + "/upload",
9494
},
9595
{
9696
name: "Uses custom UploadAPIRootUrl if provided",
@@ -145,13 +145,13 @@ func TestGetDefaultBuildEndpoint(t *testing.T) {
145145
}{
146146
{
147147
name: "Uses InsightHub build endpoint with HUB prefix",
148-
apiKey: endpoints.HUB_PREFIX + "XYZ",
148+
apiKey: endpoints.SECONDARY_API_PREFIX + "XYZ",
149149
options: options.CLI{
150150
Globals: options.Globals{
151151
Port: 9000,
152152
},
153153
},
154-
expectPrefix: endpoints.HUB_BUILD,
154+
expectPrefix: endpoints.SECONDARY_BUILD_ENDPOINT,
155155
},
156156
{
157157
name: "Uses Bugsnag build endpoint with non-HUB key",
@@ -161,7 +161,7 @@ func TestGetDefaultBuildEndpoint(t *testing.T) {
161161
Port: 0,
162162
},
163163
},
164-
expectPrefix: endpoints.BUGSNAG_BUILD,
164+
expectPrefix: endpoints.PRIMARY_BUILD_ENDPOINT,
165165
},
166166
{
167167
name: "Uses custom BuildApiRootUrl if provided",

0 commit comments

Comments
 (0)