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.
Show state changes and actor/assignee filters in activity
8e93a8f0e42847734facadaa8a56f857ed1a1565 · Keenan Nemetz · 15d ago · parent 2973f727
Show state changes and actor/assignee filters in activity Issue state changes now write a canonical "issue: <id> <state>" subject, the same shape requests already used, so the feed can read closed, reopened, and merged events from the metadata log without diffing historical files. The CLI and the web share metadata.SetIssueState. The repository feed filters by type, actor, and assignee. Filters survive type changes and HTMX swaps, and are applied before the 100-event limit so an older matching event is not hidden by newer unrelated ones.
metadata/issue_write.go +21−1
| @@ -66,6 +66,26 @@ func CreateIssue(g *git.Repo, iss *Issue, author string) error { | |||
| 66 | 66 | ||
| 67 | 67 | // Update applies mutate to an existing issue and commits the result. | |
| 68 | 68 | func UpdateIssue(g *git.Repo, id string, mutate func(*Issue) error, actor string) (*Issue, error) { | |
| 69 | return updateIssue(g, id, mutate, actor, "issue: update "+id) | ||
| 70 | } | ||
| 71 | |||
| 72 | // SetIssueState closes or reopens an issue with a log subject that names the | ||
| 73 | // state, so the activity feed can derive state changes from the metadata branch | ||
| 74 | // without diffing every historical issue file. | ||
| 75 | func SetIssueState(g *git.Repo, id, state, actor string) (*Issue, error) { | ||
| 76 | if state != "open" && state != "closed" { | ||
| 77 | return nil, fmt.Errorf("issues: state must be open or closed") | ||
| 78 | } | ||
| 79 | return updateIssue(g, id, func(iss *Issue) error { | ||
| 80 | if iss.State == state { | ||
| 81 | return ErrNoChange | ||
| 82 | } | ||
| 83 | iss.State = state | ||
| 84 | return nil | ||
| 85 | }, actor, fmt.Sprintf("issue: %s %s", id, state)) | ||
| 86 | } | ||
| 87 | |||
| 88 | func updateIssue(g *git.Repo, id string, mutate func(*Issue) error, actor, message string) (*Issue, error) { | ||
| 69 | 89 | list, err := LoadIssues(g, Ref) | |
| 70 | 90 | if err != nil { | |
| 71 | 91 | return nil, err | |
| @@ -97,7 +117,7 @@ func UpdateIssue(g *git.Repo, id string, mutate func(*Issue) error, actor string | |||
| 97 | 117 | _, err = git.CommitFiles(g, Ref, func(files map[string][]byte) error { | |
| 98 | 118 | files[base+issueName] = raw | |
| 99 | 119 | return nil | |
| 100 | }, fmt.Sprintf("issue: update %s", target.ID), actorOr(actor, target.Author)) | ||
| 120 | }, message, actorOr(actor, target.Author)) | ||
| 101 | 121 | if err != nil { | |
| 102 | 122 | return nil, err | |
| 103 | 123 | } | |