Skip to content

Organization Webhook

Definition of a Webhook on organization level, the following properties are supported:

Key Value Description Notes
url string The payload url to which a POST request will be sent when the webhook gets triggered
active boolean If the webhook is active
aliases list[string] List of webhook alias urls, can be used to change the url of a webhook without re-creating the webhook as a whole read-only property
content_type string The content type the webhook shall use json or form
events list[string] List of events that trigger the webhook supported events
insecure_ssl string If the webhook uses insecure ssl connections 0 or 1
secret SecretValue or null The secret the webhook shall use if any

The secret should reference a credential provider instead of being written in clear text, see SecretValue.

Jsonnet Function

orgs.newOrgWebhook('<url>') {
  <key>: <value>
}

Validation rules

  • redacted secrets (********) trigger a validation info and will skip the webhook during processing
  • content_type must either be json or form
  • insecure_ssl must either be 0 (disabled) or 1 (enabled)

Example usage

orgs.newOrg('adoptium') {
  ...
  webhooks+: [
    orgs.newOrgWebhook('https://app.codacy.com/2.0/events/gh/organization') {
      content_type: "json",
      events+: [
        "meta",
        "organization",
        "repository"
      ],
      secret: "pass:path/to/my/webhook/secret",
    },
  ],
  ...
}