Skip to content

Commit

Permalink
Merge pull request #334 from reviewdog/fix-check-name
Browse files Browse the repository at this point in the history
github-pr-check: fix missing name
  • Loading branch information
haya14busa committed Sep 29, 2019
2 parents 456d77b + 35f495b commit 81f21e9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doghouse/server/doghouse.go
Expand Up @@ -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()},
Expand All @@ -109,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.
Expand Down
3 changes: 3 additions & 0 deletions doghouse/server/doghouse_test.go
Expand Up @@ -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 {
Expand Down

0 comments on commit 81f21e9

Please sign in to comment.