Skip to content
Open
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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions api/v1alpha1/webhookpreset_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,15 @@ type WebhookSpec struct {
Active *bool `json:"active,omitempty"`

// Events is a list of GitHub event types that trigger this webhook.
// If empty, the webhook subscribes to all events ("*").
// If omitted or empty, the webhook subscribes to "push".
// Set events to ["*"] to subscribe to all events.
// Common events include "push", "pull_request", "issues", "release".
// See: https://docs.github.com/en/webhooks/webhook-events-and-payloads
// +kubebuilder:validation:Type=array
// +kubebuilder:validation:MinItems=0
// +kubebuilder:validation:MaxItems=100
// +kubebuilder:validation:Items=string
// +kubebuilder:validation:items:Enum=branch_protection_rule;check_run;check_suite;code_scanning_alert;commit_comment;create;delete;dependabot_alert;deploy_key;deployment;deployment_status;discussion;discussion_comment;fork;github_app_authorization;gollum;installation;installation_repositories;issue_comment;issues;label;marketplace_purchase;member;membership;merge_group;meta;milestone;organization;org_block;package;page_build;ping;project;project_card;project_column;public;pull_request;pull_request_review;pull_request_review_comment;pull_request_review_thread;push;registry_package;release;repository;repository_dispatch;repository_import;repository_vulnerability_alert;secret_scanning_alert;security_advisory;sponsorship;star;status;team;team_add;watch;workflow_dispatch;workflow_job;workflow_run
// +kubebuilder:validation:items:Enum="*";branch_protection_rule;check_run;check_suite;code_scanning_alert;commit_comment;create;delete;dependabot_alert;deploy_key;deployment;deployment_status;discussion;discussion_comment;fork;github_app_authorization;gollum;installation;installation_repositories;issue_comment;issues;label;marketplace_purchase;member;membership;merge_group;meta;milestone;organization;org_block;package;page_build;ping;project;project_card;project_column;public;pull_request;pull_request_review;pull_request_review_comment;pull_request_review_thread;push;registry_package;release;repository;repository_dispatch;repository_import;repository_vulnerability_alert;secret_scanning_alert;security_advisory;sponsorship;star;status;team;team_add;watch;workflow_dispatch;workflow_job;workflow_run
Events []string `json:"events,omitempty"`

// SSLVerify enables SSL certificate verification for the webhook endpoint.
Expand Down
4 changes: 3 additions & 1 deletion config/crd/bases/github.interhyp.de_repositories.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1292,11 +1292,13 @@ spec:
events:
description: |-
Events is a list of GitHub event types that trigger this webhook.
If empty, the webhook subscribes to all events ("*").
If omitted or empty, the webhook subscribes to "push".
Set events to ["*"] to subscribe to all events.
Common events include "push", "pull_request", "issues", "release".
See: https://docs.github.com/en/webhooks/webhook-events-and-payloads
items:
enum:
- '*'
- branch_protection_rule
- check_run
- check_suite
Expand Down
4 changes: 3 additions & 1 deletion config/crd/bases/github.interhyp.de_webhookpresets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,13 @@ spec:
events:
description: |-
Events is a list of GitHub event types that trigger this webhook.
If empty, the webhook subscribes to all events ("*").
If omitted or empty, the webhook subscribes to "push".
Set events to ["*"] to subscribe to all events.
Common events include "push", "pull_request", "issues", "release".
See: https://docs.github.com/en/webhooks/webhook-events-and-payloads
items:
enum:
- '*'
- branch_protection_rule
- check_run
- check_suite
Expand Down
2 changes: 1 addition & 1 deletion docs/crds.md
Original file line number Diff line number Diff line change
Expand Up @@ -1512,7 +1512,7 @@ _Appears in:_
| `secretValue` _string_ | SecretValue is the plaintext value of the webhook secret.<br />Use this for simple cases, but Secret (referencing a Kubernetes Secret) is more secure.<br />If both Secret and SecretValue are provided, Secret takes precedence. | | Type: string <br /> |
| `contentType` _string_ | ContentType specifies the format of the webhook payload.<br />- "json": Send payload as application/json (recommended)<br />- "form": Send payload as application/x-www-form-urlencoded<br />See: https://docs.github.com/en/webhooks/webhook-events-and-payloads | | Enum: [json form] <br />Type: string <br /> |
| `active` _boolean_ | Active determines whether the webhook is active and will send events.<br />Set to false to temporarily disable the webhook without deleting it. | true | |
| `events` _string array_ | Events is a list of GitHub event types that trigger this webhook.<br />If empty, the webhook subscribes to all events ("*").<br />Common events include "push", "pull_request", "issues", "release".<br />See: https://docs.github.com/en/webhooks/webhook-events-and-payloads | | MaxItems: 100 <br />MinItems: 0 <br />Type: array <br />items:Enum: [branch_protection_rule check_run check_suite code_scanning_alert commit_comment create delete dependabot_alert deploy_key deployment deployment_status discussion discussion_comment fork github_app_authorization gollum installation installation_repositories issue_comment issues label marketplace_purchase member membership merge_group meta milestone organization org_block package page_build ping project project_card project_column public pull_request pull_request_review pull_request_review_comment pull_request_review_thread push registry_package release repository repository_dispatch repository_import repository_vulnerability_alert secret_scanning_alert security_advisory sponsorship star status team team_add watch workflow_dispatch workflow_job workflow_run] <br /> |
| `events` _string array_ | Events is a list of GitHub event types that trigger this webhook.<br />If omitted or empty, the webhook subscribes to "push".<br />Set events to ["*"] to subscribe to all events.<br />Common events include "push", "pull_request", "issues", "release".<br />See: https://docs.github.com/en/webhooks/webhook-events-and-payloads | | MaxItems: 100 <br />MinItems: 0 <br />Type: array <br />items:Enum: [* branch_protection_rule check_run check_suite code_scanning_alert commit_comment create delete dependabot_alert deploy_key deployment deployment_status discussion discussion_comment fork github_app_authorization gollum installation installation_repositories issue_comment issues label marketplace_purchase member membership merge_group meta milestone organization org_block package page_build ping project project_card project_column public pull_request pull_request_review pull_request_review_comment pull_request_review_thread push registry_package release repository repository_dispatch repository_import repository_vulnerability_alert secret_scanning_alert security_advisory sponsorship star status team team_add watch workflow_dispatch workflow_job workflow_run] <br /> |
| `sslVerify` _boolean_ | SSLVerify enables SSL certificate verification for the webhook endpoint.<br />When true, GitHub verifies the SSL certificate of the PayloadURL.<br />Disable only for testing with self-signed certificates; always enable in production. | true | |


Expand Down
3 changes: 2 additions & 1 deletion schemas/repository_v1alpha1.json
Original file line number Diff line number Diff line change
Expand Up @@ -1121,9 +1121,10 @@
"type": "string"
},
"events": {
"description": "Events is a list of GitHub event types that trigger this webhook.\nIf empty, the webhook subscribes to all events (\"*\").\nCommon events include \"push\", \"pull_request\", \"issues\", \"release\".\nSee: https://docs.github.com/en/webhooks/webhook-events-and-payloads",
"description": "Events is a list of GitHub event types that trigger this webhook.\nIf omitted or empty, the webhook subscribes to \"push\".\nSet events to [\"*\"] to subscribe to all events.\nCommon events include \"push\", \"pull_request\", \"issues\", \"release\".\nSee: https://docs.github.com/en/webhooks/webhook-events-and-payloads",
"items": {
"enum": [
"*",
"branch_protection_rule",
"check_run",
"check_suite",
Expand Down
3 changes: 2 additions & 1 deletion schemas/webhookpreset_v1alpha1.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@
"type": "string"
},
"events": {
"description": "Events is a list of GitHub event types that trigger this webhook.\nIf empty, the webhook subscribes to all events (\"*\").\nCommon events include \"push\", \"pull_request\", \"issues\", \"release\".\nSee: https://docs.github.com/en/webhooks/webhook-events-and-payloads",
"description": "Events is a list of GitHub event types that trigger this webhook.\nIf omitted or empty, the webhook subscribes to \"push\".\nSet events to [\"*\"] to subscribe to all events.\nCommon events include \"push\", \"pull_request\", \"issues\", \"release\".\nSee: https://docs.github.com/en/webhooks/webhook-events-and-payloads",
"items": {
"enum": [
"*",
"branch_protection_rule",
"check_run",
"check_suite",
Expand Down
Loading