Move to Gitea: git.ryuvia.com/niklas/terdut-tui
CI / test (push) Successful in 13s
Release / test (push) Successful in 14s
Release / binaries (push) Successful in 1m37s

The module path, the CI pipeline and the self-updater all named GitHub. They now
name the Gitea instance everything else already runs on.

The workflows are rewritten rather than translated, for the reason recorded in
ci.yaml: Gitea's runner image is ubuntu:22.04, whose nodejs is Node 12, so no JS
action runs there -- actions/checkout@v4 dies with a SyntaxError before doing
anything. Every step is shell and checkout is a plain clone, which this public
repo needs no credential for. upload-artifact/download-artifact are JS actions
too, and there is no artifact store here, so the job that builds the binaries is
the job that publishes them.

internal/updater keeps its release and asset types unchanged: Gitea's release
payload carries the same tag_name, and its attachments the same name and
browser_download_url, so only the URL, the Accept header and one error string
move. The asset naming in release.yaml is load-bearing for that matching.

This does strand already-installed binaries, which still poll api.github.com.
The GitHub repository is left in place and untouched, so they report themselves
up to date rather than erroring; its last release is the bridge, and crossing it
is a one-time manual download.
This commit is contained in:
Niklas Ye
2026-08-19 20:41:05 +02:00
parent e336aeea97
commit 6fdb4bbbf8
16 changed files with 209 additions and 127 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ import (
"github.com/charmbracelet/bubbles/viewport"
tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/lipgloss"
"github.com/yeniklas/terdut-tui/internal/api"
"git.ryuvia.com/niklas/terdut-tui/internal/api"
)
// ── Enums ──────────────────────────────────────────────────────────────────
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"time"
"github.com/charmbracelet/bubbles/table"
"github.com/yeniklas/terdut-tui/internal/api"
"git.ryuvia.com/niklas/terdut-tui/internal/api"
)
func TestNextFilter(t *testing.T) {
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"strings"
"github.com/charmbracelet/lipgloss"
"github.com/yeniklas/terdut-tui/internal/api"
"git.ryuvia.com/niklas/terdut-tui/internal/api"
)
var (
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"github.com/atotto/clipboard"
"github.com/charmbracelet/bubbles/viewport"
tea "github.com/charmbracelet/bubbletea"
"github.com/yeniklas/terdut-tui/internal/api"
"git.ryuvia.com/niklas/terdut-tui/internal/api"
)
func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"time"
tea "github.com/charmbracelet/bubbletea"
"github.com/yeniklas/terdut-tui/internal/api"
"git.ryuvia.com/niklas/terdut-tui/internal/api"
)
// press sends one key and returns the resulting model and command. A nil command
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"time"
"github.com/charmbracelet/lipgloss"
"github.com/yeniklas/terdut-tui/internal/api"
"git.ryuvia.com/niklas/terdut-tui/internal/api"
)
// Order must match the section constants — renderTabs indexes this by ordinal.
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"time"
tea "github.com/charmbracelet/bubbletea"
"github.com/yeniklas/terdut-tui/internal/api"
"git.ryuvia.com/niklas/terdut-tui/internal/api"
)
// ansi matches the escape sequences lipgloss emits when it decides the output
+10 -3
View File
@@ -12,7 +12,14 @@ import (
"strings"
)
const releaseAPI = "https://api.github.com/repos/yeniklas/terdut-tui/releases/latest"
// Gitea's release payload carries the same tag_name, and its attachments the same name
// and browser_download_url, so the types below are unchanged from the GitHub original.
//
// A binary installed before the move still polls api.github.com and will never see a
// release published here. That GitHub repository is still in place, so such a build
// reports itself up to date rather than erroring -- its last GitHub release is the
// bridge, and crossing it is a one-time manual download.
const releaseAPI = "https://git.ryuvia.com/api/v1/repos/niklas/terdut-tui/releases/latest"
type release struct {
TagName string `json:"tag_name"`
@@ -125,7 +132,7 @@ func fetchLatest() (*release, error) {
if err != nil {
return nil, err
}
req.Header.Set("Accept", "application/vnd.github+json")
req.Header.Set("Accept", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
@@ -134,7 +141,7 @@ func fetchLatest() (*release, error) {
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
return nil, fmt.Errorf("GitHub API returned %s", resp.Status)
return nil, fmt.Errorf("Gitea API returned %s", resp.Status)
}
var rel release