fix: page hint for comment list, keep SSH settings on re-login, hard-link-free downloads, stable OWNER/REPO#N instance (follow gh)

Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
bircni committed 2026-10-18 20:03:15 +02:00
1 parent dfb56eae67
commit 8305a89531
11 files changed
+154 -10

No files matched your search

+17
View File
@@ -235,3 +235,20 @@ func TestExpandMeUsesTheLoginTeaActsAs(t *testing.T) {
require.NoError(t, err)
require.Equal(t, "bob", resolved.expandMe("@me"))
}
func TestResolveRefsKeepsTheReferenceThatNamesAnInstance(t *testing.T) {
a, serverURL := refApplication(t, nil)
// GITEA_TOKEN belongs to serverURL, so selecting the other instance is what fails here.
other := strings.Replace(serverURL, "127.0.0.1", "localhost", 1)
const mismatch = "matching the selected instance"
for _, raws := range [][]string{
{other + "/bob/tool/issues/1", "bob/tool#2"},
{"bob/tool#2", other + "/bob/tool/issues/1"},
} {
_, _, err := a.resolveRefs(commandContext(), raws, issueRef)
require.ErrorContains(t, err, mismatch, raws)
}
a.options.repo = other + "/bob/tool"
_, _, err := a.resolveRef(commandContext(), "bob/tool#2", issueRef)
require.ErrorContains(t, err, mismatch, "an argument without an instance keeps the --repo one")
}