detached 4db3b8b

Merge pull request 'feat(ci): add the GitHub run name to Run' (#8) from feat/run-name into main

commit
4db3b8badaf6fb1d1f0cd969c9f187c15645d3d8
author
bnema · · 2026-10-13 03:47 UTC
merge of
f8f6441 + 5a86d44 · diff against the first parent
signature
SSH UnverifiedSHA256:VOCA5lYARHcbKDZ7GhTV45VmcjWnJ6ZQIBazj17LivA The key is unknown
refs
tag: v0.1.0
3 files · +60 -9
M gen/ermite/run.pb.go +25 -6 generated file: collapsed
M gen_test.go +21 -0
@@ -329,3 +329,24 @@ func TestCompleteJobRoundTrip(t *testing.T) {
329329 t.Errorf("unexpected response %v", r)
330330 }
331331 }
332+
333+// TestRunNameField pins the number of Run.name, the GitHub name of the run
334+// that sits next to workflow_name, and that it survives the wire.
335+func TestRunNameField(t *testing.T) {
336+ fd := (&ermite.Run{}).ProtoReflect().Descriptor().Fields().ByName("name")
337+ if fd == nil || fd.Number() != 19 {
338+ t.Fatalf("Run.name = %v, want field 19", fd)
339+ }
340+ in := &ermite.Run{WorkflowName: "Names Workflow", Name: "run push on branch by someone", Title: "run push on branch by someone"}
341+ b, err := proto.Marshal(in)
342+ if err != nil {
343+ t.Fatal(err)
344+ }
345+ var out ermite.Run
346+ if err := proto.Unmarshal(b, &out); err != nil {
347+ t.Fatal(err)
348+ }
349+ if out.GetName() != in.GetName() || out.GetWorkflowName() != "Names Workflow" {
350+ t.Errorf("round trip: name %q, workflow_name %q", out.GetName(), out.GetWorkflowName())
351+ }
352+}
@@ -329,3 +329,24 @@ func TestCompleteJobRoundTrip(t *testing.T) {
329 t.Errorf("unexpected response %v", r)329 t.Errorf("unexpected response %v", r)
330 }330 }
331 }331 }
332+
333+// TestRunNameField pins the number of Run.name, the GitHub name of the run
334+// that sits next to workflow_name, and that it survives the wire.
335+func TestRunNameField(t *testing.T) {
336+ fd := (&ermite.Run{}).ProtoReflect().Descriptor().Fields().ByName("name")
337+ if fd == nil || fd.Number() != 19 {
338+ t.Fatalf("Run.name = %v, want field 19", fd)
339+ }
340+ in := &ermite.Run{WorkflowName: "Names Workflow", Name: "run push on branch by someone", Title: "run push on branch by someone"}
341+ b, err := proto.Marshal(in)
342+ if err != nil {
343+ t.Fatal(err)
344+ }
345+ var out ermite.Run
346+ if err := proto.Unmarshal(b, &out); err != nil {
347+ t.Fatal(err)
348+ }
349+ if out.GetName() != in.GetName() || out.GetWorkflowName() != "Names Workflow" {
350+ t.Errorf("round trip: name %q, workflow_name %q", out.GetName(), out.GetWorkflowName())
351+ }
352+}
M proto/ermite/run.proto +14 -3
@@ -27,10 +27,14 @@ message Run {
2727 // ".github/workflows/ci.yml".
2828 string workflow_path = 5;
2929 // WorkflowName is the "name" of the workflow, or workflow_path when it has
30- // none (as GitHub does).
30+ // none (as GitHub does). It is the "github.workflow" of the run and the
31+ // workflow name of its checks. See name for the name of the run itself.
3132 string workflow_name = 6;
32- // Title is the first line of the message of the commit sha, at most 256
33- // characters (GitHub's display title).
33+ // Title is GitHub's display title, at most 256 characters: the evaluated
34+ // "run-name" of the workflow when it has one, else for a push to a branch
35+ // the first line of the message of the commit sha, and for a push of a tag
36+ // the name of the workflow registered for workflow_path (the "name" of that
37+ // file on the default branch, else workflow_name).
3438 string title = 7;
3539 // Event is the event that triggered the run, in GitHub's name: "push" (the
3640 // only one for now; push to a branch or a tag, and merge of a merge
@@ -73,6 +77,13 @@ message Run {
7377 // not delivered in order, and a client that holds two copies of a run keeps
7478 // the one with the higher version and drops the other.
7579 int64 version = 18;
80+ // Name is the name of the run, GitHub's "name" of a workflow run: the
81+ // evaluated "run-name" of the workflow when it has one, else the same value
82+ // as workflow_name. It is what GitHub lists as the run's name, whereas
83+ // workflow_name stays the name of the workflow ("github.workflow") even when
84+ // the workflow has a "run-name". A run stored before this field existed
85+ // reads as workflow_name.
86+ string name = 19;
7687 }
7788
7889 // RunJob is a job of a run as people see it: the state of one job instance
@@ -27,10 +27,14 @@ message Run {
27 // ".github/workflows/ci.yml".27 // ".github/workflows/ci.yml".
28 string workflow_path = 5;28 string workflow_path = 5;
29 // WorkflowName is the "name" of the workflow, or workflow_path when it has29 // WorkflowName is the "name" of the workflow, or workflow_path when it has
30- // none (as GitHub does).30+ // none (as GitHub does). It is the "github.workflow" of the run and the
31+ // workflow name of its checks. See name for the name of the run itself.
31 string workflow_name = 6;32 string workflow_name = 6;
32- // Title is the first line of the message of the commit sha, at most 25633+ // Title is GitHub's display title, at most 256 characters: the evaluated
33- // characters (GitHub's display title).34+ // "run-name" of the workflow when it has one, else for a push to a branch
35+ // the first line of the message of the commit sha, and for a push of a tag
36+ // the name of the workflow registered for workflow_path (the "name" of that
37+ // file on the default branch, else workflow_name).
34 string title = 7;38 string title = 7;
35 // Event is the event that triggered the run, in GitHub's name: "push" (the39 // Event is the event that triggered the run, in GitHub's name: "push" (the
36 // only one for now; push to a branch or a tag, and merge of a merge40 // only one for now; push to a branch or a tag, and merge of a merge
@@ -73,6 +77,13 @@ message Run {
73 // not delivered in order, and a client that holds two copies of a run keeps77 // not delivered in order, and a client that holds two copies of a run keeps
74 // the one with the higher version and drops the other.78 // the one with the higher version and drops the other.
75 int64 version = 18;79 int64 version = 18;
80+ // Name is the name of the run, GitHub's "name" of a workflow run: the
81+ // evaluated "run-name" of the workflow when it has one, else the same value
82+ // as workflow_name. It is what GitHub lists as the run's name, whereas
83+ // workflow_name stays the name of the workflow ("github.workflow") even when
84+ // the workflow has a "run-name". A run stored before this field existed
85+ // reads as workflow_name.
86+ string name = 19;
76 }87 }
77 88
78 // RunJob is a job of a run as people see it: the state of one job instance89 // RunJob is a job of a run as people see it: the state of one job instance

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 2

Tags 18

↑↓ moveenter openesc close