Skip to content

Commit 99735e0

Browse files
authored
chore: use new api (#4816)
* chore: use new api * improvements * cl * updates
1 parent 58e0dfe commit 99735e0

File tree

7 files changed

+12
-10
lines changed

7 files changed

+12
-10
lines changed

changelog.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@
22

33
## Unreleased
44

5-
### Informational
5+
## [`v29.4.2`](https://github.com/ignite/cli/releases/tag/v29.4.2)
66

7-
From this version on, Snapcraft support has been removed. Please migrate to [Homebrew](https://brew.sh/) for a better experience. Homebrew works for both macOS and GNU/Linux.
7+
### Changes
8+
9+
- [#4811](https://github.com/ignite/cli/pull/4811) From this version on, Snapcraft support has been removed. Please migrate to [Homebrew](https://brew.sh/) for a better experience. Homebrew works for both macOS and GNU/Linux.
10+
- [#4816](https://github.com/ignite/cli/pull/4816) Improve announcements UI.
811

912
## [`v29.4.1`](https://github.com/ignite/cli/releases/tag/v29.4.1)
1013

ignite/cmd/bubblemodel/chain_serve.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ func (m ChainServe) renderQuitView() string {
260260
view.WriteRune('\n')
261261
}
262262

263-
fmt.Fprintf(&view, "%s %s\n", icons.Info, colors.Info("Stopped"))
263+
fmt.Fprintf(&view, "%s %s\n\n", icons.Info, colors.Info("Stopped"))
264264
view.WriteString(announcements.Fetch())
265265

266266
return view.String()

ignite/cmd/cmd.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,7 @@ To get started, create a blockchain:
7070
7171
$ ignite scaffold chain example
7272
73-
Announcements:
74-
%s
75-
`, announcements.Fetch()),
73+
%s`, announcements.Fetch()),
7674
SilenceUsage: true,
7775
SilenceErrors: true,
7876
Args: cobra.MinimumNArgs(0), // note(@julienrbrt): without this, ignite __complete(noDesc) hidden commands are not working.

ignite/internal/analytics/analytics.go

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

2222
const (
23-
telemetryEndpoint = "https://matomo-cli.ignite.com"
23+
telemetryEndpoint = "https://api.ignite.com/v1/telemetry"
2424
envDoNotTrack = "DO_NOT_TRACK"
2525
envCI = "CI"
2626
envGitHubActions = "GITHUB_ACTIONS"

ignite/internal/announcements/announcement.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func Fetch() string {
4343
}
4444

4545
var out strings.Builder
46-
fmt.Fprintf(&out, "\n%s %s\n", icons.Announcement, "Announcements")
46+
fmt.Fprintf(&out, "%s\n\n", "Announcements:")
4747

4848
for _, msg := range data.Announcements {
4949
fmt.Fprintf(&out, "%s %s\n", icons.Bullet, msg.Text)

ignite/internal/announcements/announcement_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"testing"
88

99
"github.com/ignite/cli/v29/ignite/internal/announcements"
10+
"github.com/ignite/cli/v29/ignite/pkg/cliui/icons"
1011
)
1112

1213
func TestFetchAnnouncements(t *testing.T) {
@@ -22,7 +23,7 @@ func TestFetchAnnouncements(t *testing.T) {
2223
name: "successful retrieval",
2324
mockResponse: `{"version":1,"announcements":[{"id":"1744230503810","text":"New Ignite announcement: v1.0.0 released!","timestamp":"2025-04-09T20:28:23.810Z","user":"announcement-bot"}]}`,
2425
statusCode: http.StatusOK,
25-
expected: "\n🗣️ Announcements\n New Ignite announcement: v1.0.0 released!\n",
26+
expected: fmt.Sprintf("Announcements:\n\n%s New Ignite announcement: v1.0.0 released!\n", icons.Bullet),
2627
},
2728
{
2829
name: "empty announcements",

ignite/internal/buf/buf.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"github.com/ignite/cli/v29/ignite/pkg/errors"
99
)
1010

11-
var BufTokenURL = "https://buf.ignite.com" //nolint:gosec // URL is hardcoded and not user-provided
11+
var BufTokenURL = "https://api.ignite.com/v1/buf" //nolint:gosec // URL is hardcoded and not user-provided
1212

1313
// FetchToken fetches the buf token from the Ignite API.
1414
func FetchToken() (string, error) {

0 commit comments

Comments
 (0)