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.
Refresh the repository tab counts while the page is open
a2ec95616f4216c743cb1ae358ef8e9449ad8d1f · Keenan Nemetz · 9d ago · parent 0789f22e
Refresh the repository tab counts while the page is open
The header's open counts were only as fresh as the page load, so a reader
watching a repository had to reload to find out that an issue or a change had
been opened.
The tabs now poll /r/{name}/counts every 30s while the page is visible. The
response is the two badges as out-of-band updates, so the current tab, the
clone menu and anything the reader has typed stay where they are. A badge that
moves keeps one short ring, because a number changing elsewhere on the screen
is easy to miss. The endpoint answers 404 for a repository the viewer cannot
read, like every other page under /r/{name}.
server/ui_test.go +3−3
| @@ -41,7 +41,7 @@ func TestRepositoryPagesShareTheTabHeader(t *testing.T) { | |||
| 41 | 41 | if code != 200 { | |
| 42 | 42 | t.Fatalf("%s = %d", path, code) | |
| 43 | 43 | } | |
| 44 | for _, want := range []string{`class="repotab`, ">Activity<", ">Code<", ">Issues <span class=\"chip-count\">0</span><", ">Changes <span class=\"chip-count\">0</span><", ">Releases<", ">Runs<", ">Locks<"} { | ||
| 44 | for _, want := range []string{`class="repotab`, ">Activity<", ">Code<", ">Issues <span class=\"chip-count\" id=\"repo-issue-count\">0</span><", ">Changes <span class=\"chip-count\" id=\"repo-request-count\">0</span><", ">Releases<", ">Runs<", ">Locks<"} { | ||
| 45 | 45 | if !strings.Contains(body, want) { | |
| 46 | 46 | t.Fatalf("%s is missing the %s tab:\n%s", path, want, body) | |
| 47 | 47 | } | |
| @@ -92,8 +92,8 @@ func TestRepoTabsCountOpenIssuesAndRequests(t *testing.T) { | |||
| 92 | 92 | t.Fatalf("code page = %d", code) | |
| 93 | 93 | } | |
| 94 | 94 | for _, want := range []string{ | |
| 95 | `>Issues <span class="chip-count">1</span>`, | ||
| 96 | `>Changes <span class="chip-count">1</span>`, | ||
| 95 | `>Issues <span class="chip-count" id="repo-issue-count">1</span>`, | ||
| 96 | `>Changes <span class="chip-count" id="repo-request-count">1</span>`, | ||
| 97 | 97 | } { | |
| 98 | 98 | if !strings.Contains(body, want) { | |
| 99 | 99 | t.Fatalf("the repository tabs do not show %q:\n%s", want, body) | |