From 0fc78d9e7cb3f88aab2cbdf7283b3d5da54a3046 Mon Sep 17 00:00:00 2001 From: Alan Cha Date: Tue, 27 Oct 2020 23:23:19 -0400 Subject: [PATCH] Fix GitHub and GitLab capitalization Signed-off-by: Alan Cha --- README.md | 2 +- docs/eventlisteners.md | 2 +- examples/bitbucket/role.yaml | 2 +- examples/cron/role.yaml | 2 +- examples/event-interceptors/main.go | 6 +++--- examples/github/role.yaml | 2 +- examples/gitlab/README.md | 2 +- examples/gitlab/role.yaml | 2 +- .../clustertriggerbinding-roles/clusterrole.yaml | 2 +- examples/role-resources/triggerbinding-roles/role.yaml | 2 +- examples/triggers/rbac.yaml | 2 +- pkg/interceptors/interceptors.go | 2 +- 12 files changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 39089c88a..d05b11ae4 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ continuous integration and delivery (CI/CD) framework that enables you to create containerized, composable, and configurable workloads declaratively through CRDs. Naturally, CI/CD events contain information that should: -- Identify the kind of event (GitHub Push, Gitlab Issue, Docker Hub Webhook, +- Identify the kind of event (GitHub Push, GitLab Issue, Docker Hub Webhook, etc.) - Be accessible from and map to particular pipelines (Take SHA from payload to use it in pipeline X) diff --git a/docs/eventlisteners.md b/docs/eventlisteners.md index fd736665e..34d30d6af 100644 --- a/docs/eventlisteners.md +++ b/docs/eventlisteners.md @@ -89,7 +89,7 @@ rules: resources: ["eventlisteners", "triggerbindings", "triggertemplates", "triggers"] verbs: ["get"] - apiGroups: [""] - # secrets are only needed for Github/Gitlab interceptors + # secrets are only needed for GitHub/GitLab interceptors resources: ["configmaps", "secrets"] verbs: ["get", "list", "watch"] # Permissions to create resources in associated TriggerTemplates diff --git a/examples/bitbucket/role.yaml b/examples/bitbucket/role.yaml index d52df5db3..8f64c0f58 100644 --- a/examples/bitbucket/role.yaml +++ b/examples/bitbucket/role.yaml @@ -15,7 +15,7 @@ rules: resources: ["eventlisteners", "triggerbindings", "triggertemplates"] verbs: ["get"] - apiGroups: [""] - # secrets are only needed for Github/Gitlab interceptors, serviceaccounts only for per trigger authorization + # secrets are only needed for GitHub/GitLab interceptors, serviceaccounts only for per trigger authorization resources: ["configmaps", "secrets", "serviceaccounts"] verbs: ["get", "list", "watch"] # Permissions to create resources in associated TriggerTemplates diff --git a/examples/cron/role.yaml b/examples/cron/role.yaml index 595ce2cb1..d8c4cc892 100644 --- a/examples/cron/role.yaml +++ b/examples/cron/role.yaml @@ -8,7 +8,7 @@ rules: resources: ["eventlisteners", "triggerbindings", "triggertemplates"] verbs: ["get"] - apiGroups: [""] - # secrets are only needed for Github/Gitlab interceptors, serviceaccounts only for per trigger authorization + # secrets are only needed for GitHub/GitLab interceptors, serviceaccounts only for per trigger authorization resources: ["configmaps", "secrets", "serviceaccounts"] verbs: ["get", "list", "watch"] # Permissions to create resources in associated TriggerTemplates diff --git a/examples/event-interceptors/main.go b/examples/event-interceptors/main.go index 8b4c8327d..ff292af72 100644 --- a/examples/event-interceptors/main.go +++ b/examples/event-interceptors/main.go @@ -41,13 +41,13 @@ func main() { payload, err := github.ValidatePayload(request, []byte(secretToken)) id := github.DeliveryID(request) if err != nil { - log.Printf("Error handling Github Event with delivery ID %s : %q", id, err) + log.Printf("Error handling GitHub Event with delivery ID %s : %q", id, err) http.Error(writer, fmt.Sprint(err), http.StatusBadRequest) } - log.Printf("Handling Github Event with delivery ID: %s; Payload: %s", id, payload) + log.Printf("Handling GitHub Event with delivery ID: %s; Payload: %s", id, payload) n, err := writer.Write(payload) if err != nil { - log.Printf("Failed to write response for Github event ID: %s. Bytes writted: %d. Error: %q", id, n, err) + log.Printf("Failed to write response for GitHub event ID: %s. Bytes writted: %d. Error: %q", id, n, err) } }) diff --git a/examples/github/role.yaml b/examples/github/role.yaml index ee5a7263d..e6f8e7de2 100644 --- a/examples/github/role.yaml +++ b/examples/github/role.yaml @@ -27,7 +27,7 @@ rules: resources: ["eventlisteners", "triggerbindings", "triggertemplates"] verbs: ["get"] - apiGroups: [""] - # secrets are only needed for Github/Gitlab interceptors, serviceaccounts only for per trigger authorization + # secrets are only needed for GitHub/GitLab interceptors, serviceaccounts only for per trigger authorization resources: ["configmaps", "secrets", "serviceaccounts"] verbs: ["get", "list", "watch"] # Permissions to create resources in associated TriggerTemplates diff --git a/examples/gitlab/README.md b/examples/gitlab/README.md index c5888813f..9e1420bd8 100644 --- a/examples/gitlab/README.md +++ b/examples/gitlab/README.md @@ -1,6 +1,6 @@ ## GitLab Push EventListener -Creates an EventListener that listens for Gitlab webhook events. +Creates an EventListener that listens for GitLab webhook events. ### Try it out locally: diff --git a/examples/gitlab/role.yaml b/examples/gitlab/role.yaml index 3d5073339..0cff63388 100644 --- a/examples/gitlab/role.yaml +++ b/examples/gitlab/role.yaml @@ -8,7 +8,7 @@ rules: resources: ["eventlisteners", "triggerbindings", "triggertemplates"] verbs: ["get"] - apiGroups: [""] - # secrets are only needed for Github/Gitlab interceptors, serviceaccounts only for per trigger authorization + # secrets are only needed for GitHub/GitLab interceptors, serviceaccounts only for per trigger authorization resources: ["configmaps", "secrets", "serviceaccounts"] verbs: ["get", "list", "watch"] # Permissions to create resources in associated TriggerTemplates diff --git a/examples/role-resources/clustertriggerbinding-roles/clusterrole.yaml b/examples/role-resources/clustertriggerbinding-roles/clusterrole.yaml index 45fb6c099..b1f06f2fd 100644 --- a/examples/role-resources/clustertriggerbinding-roles/clusterrole.yaml +++ b/examples/role-resources/clustertriggerbinding-roles/clusterrole.yaml @@ -8,7 +8,7 @@ rules: resources: ["clustertriggerbindings", "eventlisteners", "triggerbindings", "triggertemplates", "triggers"] verbs: ["get"] - apiGroups: [""] - # secrets are only needed for Github/Gitlab interceptors + # secrets are only needed for GitHub/GitLab interceptors resources: ["configmaps", "secrets"] verbs: ["get", "list", "watch"] # Permissions to create resources in associated TriggerTemplates diff --git a/examples/role-resources/triggerbinding-roles/role.yaml b/examples/role-resources/triggerbinding-roles/role.yaml index 6b4ebc803..e7d18f1cc 100644 --- a/examples/role-resources/triggerbinding-roles/role.yaml +++ b/examples/role-resources/triggerbinding-roles/role.yaml @@ -8,7 +8,7 @@ rules: resources: ["eventlisteners", "triggerbindings", "triggertemplates", "triggers"] verbs: ["get"] - apiGroups: [""] - # secrets are only needed for Github/Gitlab interceptors + # secrets are only needed for GitHub/GitLab interceptors resources: ["configmaps", "secrets"] verbs: ["get", "list", "watch"] # Permissions to create resources in associated TriggerTemplates diff --git a/examples/triggers/rbac.yaml b/examples/triggers/rbac.yaml index cf1357e19..cb7e46fa0 100644 --- a/examples/triggers/rbac.yaml +++ b/examples/triggers/rbac.yaml @@ -9,7 +9,7 @@ rules: resources: ["eventlisteners", "triggerbindings", "triggertemplates", "triggers"] verbs: ["get"] - apiGroups: [""] - # secrets are only needed for Github/Gitlab interceptors + # secrets are only needed for GitHub/GitLab interceptors resources: ["configmaps", "secrets"] verbs: ["get", "list", "watch"] # Permissions to create resources in associated TriggerTemplates diff --git a/pkg/interceptors/interceptors.go b/pkg/interceptors/interceptors.go index 1b80f9439..88a270351 100644 --- a/pkg/interceptors/interceptors.go +++ b/pkg/interceptors/interceptors.go @@ -55,7 +55,7 @@ func getCache(req *http.Request) map[string]interface{} { } // GetSecretToken queries Kubernetes for the given secret reference. We use this function -// to resolve secret material like Github webhook secrets, and call it once for every +// to resolve secret material like GitHub webhook secrets, and call it once for every // trigger that references it. // // As we may have many triggers that all use the same secret, we cache the secret values