If a job is part of a group, print the IDs and statuses for other
jobs in the same group as well.
Requires a sr.ht patch [1] to work correctly.
[1]: https://lists.sr.ht/~sircmpwn/sr.ht-dev/patches/43728
---
v2: re-generate with correct gqlclientgen dep version
(upstream sr.ht bug has been fixed)
builds.go | 10 ++++++++++srht/buildssrht/gql.go | 2 +-srht/buildssrht/operations.graphql | 6 ++++++srht/buildssrht/strings.go | 4 ++++
4 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/builds.go b/builds.go
index 8894c2e553f4..6c0ca4dcd067 100644
--- a/builds.go
@@ -615,6 +615,16 @@ func printJob(w io.Writer, job *buildssrht.Job) {
}
fmt.Fprintln(w)
+ if job.Group != nil && len(job.Group.Jobs) > 1 {+ fmt.Fprintf(w, "Group: ")+ for _, j := range job.Group.Jobs {+ if j.Id == job.Id {+ continue+ }+ fmt.Fprintf(w, "%s %s ", job.Status.TermIcon(), termfmt.DarkYellow.Sprintf("#%d", j.Id))+ }