Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/git/vole.git

Write over SSH with a registered key:

git clone ssh://git@0.0.0.0:2222/vole.git

A free and open-source forge that lives in your Git repo.

Add the instance-wide activity feed to the home page

b355db72f14756ee4d7e2f503eb254ea552aa72e · Keenan Nemetz · 15d ago · parent 67a308ba

Add the instance-wide activity feed to the home page

The home page now merges every visible repository's derived feed, caps the merged result at 50 events, and names the repository on each row. The repository list moves to a compact sidebar with its own search, and the existing search-results view is unchanged. Events still come from git, the metadata branch, tags, and the queue; private repositories are excluded by the same read filter as the list.

server/polish_test.go +33

@@ -123,3 +123,36 @@ func TestCodeSearchFindsNamesAndContents(t *testing.T) {
123 123 t.Fatalf("unknown ref = %d, want an empty search page", code)
124 124 }
125 125 }
126
127 func TestHomeFeedMergesVisibleRepositories(t *testing.T) {
128 t.Parallel()
129 f := newFixture(t)
130 f.publish(f.repo)
131 work := workRepo(t, map[string]string{"readme.md": "public\n"})
132 if _, errs, err := f.git(work, "push", f.sshURL(f.repo), "main:refs/heads/main"); err != nil {
133 t.Fatalf("public push: %s", errs)
134 }
135
136 secret, err := f.srv.Repos.Create("secret", f.ownerID, "private")
137 if err != nil {
138 t.Fatal(err)
139 }
140 if err := f.srv.Index.Upsert(secret); err != nil {
141 t.Fatal(err)
142 }
143 privateWork := workRepo(t, map[string]string{"hidden.md": "private\n"})
144 if _, errs, err := runGit(t, privateWork, "commit", "--allow-empty", "-qm", "private-marker"); err != nil {
145 t.Fatalf("private commit: %s", errs)
146 }
147 if _, errs, err := f.git(privateWork, "push", f.sshURL("secret"), "main:refs/heads/main"); err != nil {
148 t.Fatalf("private push: %s", errs)
149 }
150
151 _, body := f.get("/")
152 if !strings.Contains(body, "initial") || !strings.Contains(body, `href="/r/demo"`) {
153 t.Fatalf("home feed does not show the public repository:\n%s", body)
154 }
155 if strings.Contains(body, "private-marker") || strings.Contains(body, `href="/r/secret"`) {
156 t.Fatalf("home feed leaked a private repository:\n%s", body)
157 }
158 }