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/web/workflows.go +24−7

@@ -24,12 +24,17 @@ type workflowJobView struct {
24 24 }
25 25
26 26 type workflowView struct {
27 Path string
28 Name string
29 Description string
30 Branches []string
31 Tags []string
32 Jobs []workflowJobView
27 Path string
28 Name string
29 Description string
30 Branches []string
31 Tags []string
32 ChangeRequest []string
33 Issues []string
34 Comments []string
35 Schedules []string
36 Dispatch bool
37 Jobs []workflowJobView
33 38 }
34 39
35 40 func (w *Web) WorkflowsPage(rw http.ResponseWriter, r *http.Request) {
@@ -56,7 +61,19 @@ func (w *Web) WorkflowsPage(rw http.ResponseWriter, r *http.Request) {
56 61 for _, wf := range workflows {
57 62 view := workflowView{
58 63 Path: wf.Path, Name: wf.Name, Description: wf.Description,
59 Branches: wf.Branches, Tags: wf.Tags,
64 Branches: wf.Branches, Tags: wf.Tags, Dispatch: wf.Dispatch != nil,
65 }
66 if wf.ChangeRequest != nil {
67 view.ChangeRequest = wf.ChangeRequest.Types
68 }
69 if wf.Issues != nil {
70 view.Issues = wf.Issues.Types
71 }
72 if wf.Comments != nil {
73 view.Comments = wf.Comments.Types
74 }
75 for _, schedule := range wf.Schedules {
76 view.Schedules = append(view.Schedules, schedule.Cron)
60 77 }
61 78 for _, job := range wf.Jobs {
62 79 image := job.Image