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/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.

Show real accounts as repository contributors

a32a859a08276681497be390d6f7195098a97ab4 · Keenan Nemetz · 5d ago · parent 802e0e52

Show real accounts as repository contributors

Count contributors from the change and issue records instead of the author text in commits: changes merged, issues those changes fixed, issues the reporter opened that were fixed, and reviews that named the merged head. The overview lists accounts by that work with compact icon counts and full labels in tooltips. The shortlog-derived contributor table and its refresh path are gone.

forge/index/index.go +4−11

@@ -101,13 +101,6 @@ CREATE TABLE IF NOT EXISTS repo_commits (
101 101 when_at INTEGER NOT NULL,
102 102 PRIMARY KEY (repo_id, pos)
103 103 );
104 CREATE TABLE IF NOT EXISTS repo_contributors (
105 repo_id TEXT NOT NULL,
106 pos INTEGER NOT NULL,
107 name TEXT NOT NULL,
108 commits INTEGER NOT NULL,
109 PRIMARY KEY (repo_id, pos)
110 );
111 104 CREATE TABLE IF NOT EXISTS repo_tags (
112 105 repo_id TEXT NOT NULL,
113 106 name TEXT NOT NULL,
@@ -335,7 +328,7 @@ CREATE VIRTUAL TABLE IF NOT EXISTS search USING fts5(
335 328 // and leaves every repo with an empty issues_sha, which makes the next read
336 329 // rebuild that repo from git. A stale row is worse than a rebuild, and a rebuild is the
337 330 // operation the index already has to survive.
338 const schemaVersion = 11
331 const schemaVersion = 12
339 332
340 333 func (s *Store) migrate() error {
341 334 var v int
@@ -359,7 +352,7 @@ DELETE FROM state_changes;
359 352 DELETE FROM events;
360 353 DELETE FROM repo_languages;
361 354 DELETE FROM repo_commits;
362 DELETE FROM repo_contributors;
355 DROP TABLE IF EXISTS repo_contributors;
363 356 DELETE FROM repo_tags;
364 357 DELETE FROM search;
365 358 UPDATE repos SET issues_sha = '', events_count = 0,
@@ -409,7 +402,7 @@ func (s *Store) Rebuild(st *repo.Store) (int, error) {
409 402 for _, table := range []string{
410 403 "issues", "issue_labels", "issue_assignees", "requests", "request_closes",
411 404 "request_approvals", "comments", "artifacts", "state_changes", "events", "search", "entity_numbers",
412 "repo_languages", "repo_commits", "repo_contributors", "repo_tags",
405 "repo_languages", "repo_commits", "repo_tags",
413 406 } {
414 407 if _, err := tx.Exec(`DELETE FROM ` + table); err != nil {
415 408 return 0, err
@@ -457,7 +450,7 @@ func (s *Store) Remove(id string) error {
457 450 for _, table := range []string{
458 451 "issues", "issue_labels", "issue_assignees", "requests", "request_closes",
459 452 "request_approvals", "comments", "artifacts", "state_changes", "events", "search",
460 "entity_numbers", "repo_languages", "repo_commits", "repo_contributors", "repo_tags",
453 "entity_numbers", "repo_languages", "repo_commits", "repo_tags",
461 454 } {
462 455 if _, err := tx.Exec(`DELETE FROM `+table+` WHERE repo_id=?`, id); err != nil {
463 456 return err