fix(repo): README lookup like Gitea, clearer branch/org errors, clone-after-create report, mirror interval 0 and search sort (follow gh)

Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
bircni committed 2026-10-18 20:03:55 +02:00
1 parent 8305a89531
commit aa181a2b5c
16 files changed
+211 -37

No files matched your search

+14
View File
@@ -385,6 +385,20 @@ func TestInstanceCompletions(t *testing.T) {
}
}
func TestCompleteArgumentBranchesUsesTheNamedRepository(t *testing.T) {
server := newAuthenticatedServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
require.Equal(t, "/api/v1/repos/bob/tool/branches", r.URL.Path)
_, _ = w.Write([]byte(`[{"name":"develop"}]`))
}))
defer server.Close()
deps, _, _ := serverDeps(t, server.URL)
a := &application{deps: deps}
cmd := &cobra.Command{}
cmd.SetContext(context.Background())
values, _ := a.completeArgumentBranches()(cmd, []string{"bob/tool"}, "")
require.Equal(t, []string{"develop"}, values)
}
func TestCompletionInstallHelp(t *testing.T) {
deps, out, _ := testDeps(t)
require.NoError(t, Execute(context.Background(), deps, []string{"completion", "bash", "--help"}))