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.
Replace the starter profile README header with a pointer to the instance repo
a407c4affead34b9b2cee929daefca74615b4fe6 · Keenan Nemetz · 1d ago · parent c980fe53
Replace the starter profile README header with a pointer to the instance repo The landing page already renders instance_name as the heading, so the generated profile/README.md repeated it and said nothing about how to change the text. It now names the file to edit and links to the instance repository's own overview, built from the configured instance_repo name. Template and Ensure take the repository name instead of the instance name, which the template no longer uses. Issue: 01M6YFHACAW6KGBTA2KZ3GC36Q
forge/instancerepo/seed_test.go +29
| @@ -0,0 +1,29 @@ | |||
| 1 | package instancerepo | ||
| 2 | |||
| 3 | import ( | ||
| 4 | "strings" | ||
| 5 | "testing" | ||
| 6 | ) | ||
| 7 | |||
| 8 | // The landing page renders the heading from instance_name, so the starter | ||
| 9 | // introduction must not repeat it, and it must point at the repository that | ||
| 10 | // holds the file it asks the reader to edit. | ||
| 11 | func TestTemplateIntroductionHasNoHeaderAndLinksItsRepository(t *testing.T) { | ||
| 12 | t.Parallel() | ||
| 13 | readme := string(Template("acme-instance")["profile/README.md"]) | ||
| 14 | if strings.HasPrefix(strings.TrimSpace(readme), "#") { | ||
| 15 | t.Fatalf("profile/README.md starts with a header: %q", readme) | ||
| 16 | } | ||
| 17 | if !strings.Contains(readme, "`profile/README.md`") || | ||
| 18 | !strings.Contains(readme, "](/r/acme-instance)") { | ||
| 19 | t.Fatalf("profile/README.md does not explain how to customize the introduction: %q", readme) | ||
| 20 | } | ||
| 21 | } | ||
| 22 | |||
| 23 | func TestTemplateIntroductionWithoutARepositoryNameStaysText(t *testing.T) { | ||
| 24 | t.Parallel() | ||
| 25 | readme := string(Template("")["profile/README.md"]) | ||
| 26 | if strings.Contains(readme, "](") { | ||
| 27 | t.Fatalf("profile/README.md with no repository name has a link: %q", readme) | ||
| 28 | } | ||
| 29 | } | ||