Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GitHub and GitLab capitalization #811

Merged
merged 1 commit into from
Oct 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion docs/eventlisteners.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/bitbucket/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/cron/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions examples/event-interceptors/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
})

Expand Down
2 changes: 1 addition & 1 deletion examples/github/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/gitlab/README.md
Original file line number Diff line number Diff line change
@@ -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:

Expand Down
2 changes: 1 addition & 1 deletion examples/gitlab/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/role-resources/triggerbinding-roles/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/triggers/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pkg/interceptors/interceptors.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down