Sign in

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

vole
Site
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software/vole.git

Self-hosted forge that lives in your Git repo.

Manage release files from the CLI and browser

c51874492382d08085b6388cea898d0d60ab9375 · Keenan Nemetz · 17d ago · parent 214e7ea6

Manage release files from the CLI and browser

Move the attach form to its own page, add move/remove operations to the CLI and browser, and simplify the release detail page to notes, files, and source links.

server/releases_test.go +11−6

@@ -1,8 +1,8 @@
1 1 package server_test
2 2
3 3 // A release is an annotated tag, so these tests push tags the way a user would
4 // and then read the web: the list, the notes, the commits since the previous
5 // release, and the tarball generated from the tag.
4 // and then read the web: the list, the notes, the files, and the tarball
5 // generated from the tag.
6 6
7 7 import (
8 8 "archive/tar"
@@ -22,8 +22,8 @@ import (
22 22 )
23 23
24 24 // releaseFixture builds a repository with one commit tagged v0.9.0 and a second
25 // commit tagged v1.0.0, both pushed, so "since the previous release" has a
26 // previous release to point at.
25 // commit tagged v1.0.0, both pushed, so a release has a previous tag to compare
26 // against and the list has more than one row.
27 27 func releaseFixture(t *testing.T) *fixture {
28 28 t.Helper()
29 29 f := newFixture(t)
@@ -93,14 +93,19 @@ func TestReleaseListAndNotes(t *testing.T) {
93 93 for _, want := range []string{
94 94 "First stable release",
95 95 "the second line", // the notes body is rendered, not just the subject
96 "1 commit(s) since v0.9.0",
97 "add the second line", // the commit the release contains
96 "Files", "Source",
98 97 "archive.tar", "archive.tar.gz",
99 98 } {
100 99 if !strings.Contains(page, want) {
101 100 t.Fatalf("release page does not show %q:\n%s", want, page)
102 101 }
103 102 }
103 // The page shows the release, not its commit history.
104 for _, unwanted := range []string{"commit(s) since", "add the second line"} {
105 if strings.Contains(page, unwanted) {
106 t.Fatalf("release page still shows %q:\n%s", unwanted, page)
107 }
108 }
104 109 // A repository with no LFS attributes gets no LFS warning.
105 110 if strings.Contains(page, "pointer files") {
106 111 t.Fatalf("release page warns about LFS in a repository that does not use it:\n%s", page)