refactor: remove helpers the new output and prompts left unused

Drop writeDownload, terminal.Require, terminal.Confirm, terminal.Row,
terminal.Record and Pulls.FindOpenByHead, which no command calls anymore,
and point their tests at the code that replaced them.

Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
bircni committed 2026-10-12 10:00:05 +02:00
1 parent eff6efe759
commit 50a604f169
8 files changed
+34 -118

No files matched your search

+4 -5
View File
@@ -57,7 +57,7 @@ func TestPullMilestoneClearUsesIssueEndpoint(t *testing.T) {
}
}
func TestFindOpenByHeadPagesPastSmallServerLimitsAndMatchesExactly(t *testing.T) {
func TestListOpenPagesPastSmallServerLimits(t *testing.T) {
client := newTestClient(t, http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
assert.Equal(t, "/api/v1/repos/alice/project/pulls", r.URL.Path)
switch r.URL.Query().Get("page") {
@@ -70,11 +70,10 @@ func TestFindOpenByHeadPagesPastSmallServerLimitsAndMatchesExactly(t *testing.T)
}
}))
service := Pulls{Client: client, Repository: "alice/project"}
item, err := service.FindOpenByHead(context.Background(), "feature")
items, err := service.ListOpen(context.Background())
require.NoError(t, err)
require.EqualValues(t, 2, item.Number)
_, err = service.FindOpenByHead(context.Background(), "FEATURE")
require.ErrorContains(t, err, "no open pull request")
require.Len(t, items, 2)
require.Equal(t, "feature", items[1].Head)
}
func TestListOpenRejectsEndlessPagination(t *testing.T) {