From 221fb2eaefdd4e2ede5e88ff976d9c0008e382d8 Mon Sep 17 00:00:00 2001 From: haya14busa Date: Sun, 29 Sep 2019 14:15:25 +0000 Subject: [PATCH 1/2] github-pr-check: fix missing name https://user-images.githubusercontent.com/3797062/65833795-16520780-e30f-11e9-9824-c0ec51b1f240.png --- doghouse/server/doghouse.go | 1 + 1 file changed, 1 insertion(+) diff --git a/doghouse/server/doghouse.go b/doghouse/server/doghouse.go index 7be8abaeef..d020f631e8 100644 --- a/doghouse/server/doghouse.go +++ b/doghouse/server/doghouse.go @@ -87,6 +87,7 @@ func (ch *Checker) postCheck(ctx context.Context, checkID int64, checks []*revie conclusion = ch.conclusion() } opt := github.UpdateCheckRunOptions{ + Name: ch.checkName(), Status: github.String("completed"), Conclusion: github.String(conclusion), CompletedAt: &github.Timestamp{Time: time.Now()}, From 35f495b1d7c70a659f6f29fcdd56f58f8d94188e Mon Sep 17 00:00:00 2001 From: haya14busa Date: Sun, 29 Sep 2019 14:18:58 +0000 Subject: [PATCH 2/2] github-pr-check: always fill check run name --- doghouse/server/doghouse.go | 1 + doghouse/server/doghouse_test.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/doghouse/server/doghouse.go b/doghouse/server/doghouse.go index d020f631e8..4986f020c8 100644 --- a/doghouse/server/doghouse.go +++ b/doghouse/server/doghouse.go @@ -110,6 +110,7 @@ func (ch *Checker) createCheck(ctx context.Context) (*github.CheckRun, error) { func (ch *Checker) postAnnotations(ctx context.Context, checkID int64, annotations []*github.CheckRunAnnotation) error { opt := github.UpdateCheckRunOptions{ + Name: ch.checkName(), Output: &github.CheckRunOutput{ Title: github.String(ch.checkTitle()), Summary: github.String(""), // Post summary with the last reqeust. diff --git a/doghouse/server/doghouse_test.go b/doghouse/server/doghouse_test.go index 55fb7e3915..3fa7a3fb43 100644 --- a/doghouse/server/doghouse_test.go +++ b/doghouse/server/doghouse_test.go @@ -103,6 +103,9 @@ func TestCheck_OK(t *testing.T) { if checkID != wantCheckID { t.Errorf("UpdateCheckRun: checkID = %d, want %d", checkID, wantCheckID) } + if opt.Name != name { + t.Errorf("UpdateCheckRunOptions.Name = %q, want %q", opt.Name, name) + } annotations := opt.Output.Annotations if len(annotations) == 0 { if *opt.Conclusion != conclusion {