vole
Clone
Read only, no credentials:
https://rodent.software/vole.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software:2222/vole.git
A free and open-source forge that lives in your Git repo.
Phase 2: issue CLI, cross-references, backlinks, filter and search
c1e3e3ca696c2bae8692775977fdae21ed50bc4a · Keenan Nemetz · 18d ago · parent 37c01e5a
Phase 2: issue CLI, cross-references, backlinks, filter and search The issue format needed no client, and still does not: every one of these is sugar over files anyone can write. The CLI exists so the common case is not ceremony. - `vole issue new|comment|close|reopen|list|show` works on the clone in the current directory. It fetches the issues branch first so its commit is a fast-forward the server will accept, validates locally so a malformed issue never costs a round trip, then pushes. Writing goes through gitx.CommitFiles, the shared CAS path, so a concurrent author's commit cannot be clobbered. - Ids may be abbreviated. `list` prints eight characters, so every id-taking command resolves prefixes and refuses an ambiguous one with the candidates listed. This was a real bug: list printed short ids while comment and close demanded the full ULID, so copying the id from the CLI's own output failed. The integration test now drives the CLI with a prefix. - `#<ulid>` in an issue body or comment renders as a link. Rewriting happens on the markdown source, skipping fenced blocks so a reference inside a code sample stays literal; a test asserts both halves. - Backlinks: commits whose message mentions an id are listed on the issue, found with `git log --grep`. git does the search, so there is no second index. - Filtering and search on the list page: state, label, and a LIKE over title and body, backed by an `issue_labels` table and an indexed `body` column. Notifications are deliberately not built. The web is read-only and has no user identity, so "in-app" has nobody to notify and email would need subscriptions, which need a store. The honest fit is a per-repo Atom feed when someone wants one; the roadmap says so rather than leaving a phantom item. Verified by hand with a clone and a key: filed an issue, listed it, commented using the short id, closed it, confirmed the web showed the closed state, the rendered comment and the label filter, and that an ambiguous prefix is refused.
internal/index/index.go +13
| @@ -68,6 +68,19 @@ CREATE TABLE IF NOT EXISTS issues ( | |||
| 68 | 68 | db.Close() | |
| 69 | 69 | return nil, err | |
| 70 | 70 | } | |
| 71 | // Body text is indexed so search does not have to touch git per query. | ||
| 72 | _, _ = db.Exec(`ALTER TABLE issues ADD COLUMN body TEXT NOT NULL DEFAULT ''`) | ||
| 73 | if _, err := db.Exec(` | ||
| 74 | CREATE TABLE IF NOT EXISTS issue_labels ( | ||
| 75 | repo_id TEXT NOT NULL, | ||
| 76 | issue_id TEXT NOT NULL, | ||
| 77 | label TEXT NOT NULL, | ||
| 78 | PRIMARY KEY (repo_id, issue_id, label) | ||
| 79 | ); | ||
| 80 | CREATE INDEX IF NOT EXISTS issue_labels_lookup ON issue_labels(repo_id, label);`); err != nil { | ||
| 81 | db.Close() | ||
| 82 | return nil, err | ||
| 83 | } | ||
| 71 | 84 | return s, nil | |
| 72 | 85 | } | |
| 73 | 86 | ||