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

Add event, schedule and manual workflow triggers

eb07ff5696e0d83201215966e3ea1e6a24467581 · Keenan Nemetz · 8d ago · parent 1cde8b9e

Add event, schedule and manual workflow triggers

Workflows can now react to change requests, issues, comments, cron
schedules and manual runs, and a push trigger can filter by the paths it
changed. Branch and tag patterns gain ! exclusion.

Event runs are pinned with a JSON payload and the runner exposes it as
VOLE_EVENT, VOLE_EVENT_ACTION and VOLE_EVENT_PATH. Change-request runs
check out the base tip and carry the head and changed files, so an event
never executes an unapproved contributor commit.

Workflow dispatch resolves typed inputs and is available from the
workflows page and `vole workflow dispatch`. Deduplication now includes
an occurrence so the same commit can run for a later event or schedule
slot while a push remains idempotent.

Part of: #138

server/server.go +10

@@ -47,6 +47,10 @@ type Server struct {
47 47 Log *slog.Logger
48 48 mux *http.ServeMux
49 49 acme *acmeSetup
50 // metadataWake nudges the metadata event loop after a browser write. Pushes
51 // deliver the same information through the spool; this is the path a write made
52 // without a push uses.
53 metadataWake chan struct{}
50 54 }
51 55
52 56 func New(cfg *config.Config, binPath string, log *slog.Logger) (*Server, error) {
@@ -156,10 +160,14 @@ func New(cfg *config.Config, binPath string, log *slog.Logger) (*Server, error)
156 160 Runs: inst.Runs, Index: inst.Index, acme: acme,
157 161 LFS: inst.LFS, Locks: inst.Locks, PageViews: inst.PageViews,
158 162 Proxy: proxy, SSH: ssh, Web: wp, Log: log,
163 metadataWake: make(chan struct{}, 1),
159 164 }
160 165 wp.Logs = inst.Logs
161 166 wp.AllowCI = s.allowContributorCI
162 167 wp.EnsureCandidate = s.ensureCandidateForWeb
168 wp.MetadataChanged = s.wakeMetadata
169 wp.DispatchWorkflow = s.dispatchWorkflow
170 ssh.SetDispatchWorkflow(s.dispatchWorkflow)
163 171 wp.RenameRepo = inst.RenameRepo
164 172 wp.DeleteRepo = inst.DeleteRepo
165 173 // Sites are opt-in: without a pages domain there is no host to serve them on,
@@ -181,6 +189,8 @@ func New(cfg *config.Config, binPath string, log *slog.Logger) (*Server, error)
181 189 go s.watchRoster(s.ctx)
182 190 go s.watchSpool(s.ctx)
183 191 go s.watchRefs(s.ctx)
192 go s.watchMetadata(s.ctx)
193 go s.watchSchedules(s.ctx)
184 194 go s.watchCandidates(s.ctx)
185 195 go s.watchAutoMerges(s.ctx)
186 196 go s.watchLeases(s.ctx)