From 577dfbab27a070a485f766694419e2d321b7b40c Mon Sep 17 00:00:00 2001 From: jdamick Date: Thu, 12 May 2016 12:34:30 -0400 Subject: [PATCH] fix for issue #1502 --- remote/github/github.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/remote/github/github.go b/remote/github/github.go index 80e5390e..6bf806a0 100644 --- a/remote/github/github.go +++ b/remote/github/github.go @@ -350,8 +350,18 @@ func (c *client) Status(u *model.User, r *model.Repo, b *model.Build, link strin } func repoStatus(client *github.Client, r *model.Repo, b *model.Build, link string) error { + context := "continuous-integration/drone" + switch b.Event { + case model.EventPull: + context += "/pr" + default: + if len(b.Event) > 0 { + context += "/" + b.Event + } + } + data := github.RepoStatus{ - Context: github.String("continuous-integration/drone"), + Context: github.String(context), State: github.String(convertStatus(b.Status)), Description: github.String(convertDesc(b.Status)), TargetURL: github.String(link),