Make description lowercase and remove namespace from context

This commit is contained in:
Philip Laine 2020-08-29 16:56:30 +02:00
parent 029630b9ed
commit c071b5e154
2 changed files with 4 additions and 1 deletions

1
go.mod
View File

@ -12,6 +12,7 @@ require (
github.com/onsi/ginkgo v1.12.1
github.com/onsi/gomega v1.10.1
github.com/stretchr/testify v1.6.1
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
k8s.io/api v0.18.8
k8s.io/apimachinery v0.18.8
k8s.io/client-go v0.18.8

View File

@ -68,8 +68,10 @@ func (g *GitHub) Post(event recorder.Event) error {
return err
}
githubCtx := fmt.Sprintf("%v/%v/%v", event.InvolvedObject.Kind, event.InvolvedObject.Namespace, event.InvolvedObject.Name)
githubCtx := fmt.Sprintf("%v/%v", event.InvolvedObject.Kind, event.InvolvedObject.Name)
githubCtx = strings.ToLower(githubCtx)
desc := strings.Join(split(event.Reason), " ")
desc = strings.ToLower(desc)
status := &github.RepoStatus{
State: &state,
Context: &githubCtx,