Commit 6e0618a8 authored by zauberstuhl's avatar zauberstuhl

Update repo status not user status

in case the user has no push premission
the testuite will not have enough permissions
to update the user status
parent b601417f
......@@ -269,8 +269,15 @@ func (build *Build) UpdateStatus(client *github.Client, params... string) {
if len(params) >= 2 {
repoStatus.TargetURL = &params[1]
}
slug := strings.Split(build.Repo.Slug, "/")
if len(slug) <= 1 {
fmt.Printf("#%d: Invalid repor slug: %s\n", build.ID, build.Repo.Slug)
return
}
if _, _, err := client.Repositories.CreateStatus(context.Background(),
build.PRUser, build.PRRepo, build.PRSha, &repoStatus); err != nil {
slug[0], slug[1], build.PRSha, &repoStatus); err != nil {
fmt.Printf("#%d: Cannot update status: %+v\n", build.ID, err)
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment