Getting Started
#
Creating a WebhookThe following is an example of a webhook.
You can check the webhook list after creating the webhook on Kubernetes.
#
RepositoriesThe repositories
array indicates which repositories to handle.
#
ResourcesThe resources
array indicates resources to apply when a pull request is opened or updated. apiVersion
, kind
and metadata.name
are required for a resource.
The webhook and the resources to apply must be in the same namespace. Because Garbage Collection in Kubernetes disallows cross-namespace references.
When a pull request is opened or updated, Pullup will search the existing resource by apiVersion
, kind
and metadata.name
, then merge the resources
array into the existing resource, finally create resources using the merged result. If the resources does not exist before, Pullup will create resources using the resources
array directly. See the table below for example.
Original | Patched |
---|---|
#
Registering on GitHubAfter creating the webhook on your Kubernetes cluster. You can register it on your GitHub repository or organization.
- Payload URL:
http://your-site.com/webhooks/github
- Content Type:
application/json
- Secret: See Securing Your Webhooks below.
- Events: Choose Pull Requests only.
More details: https://developer.github.com/webhooks/creating/
#
Securing Your WebhooksIt is recommended to set a secret on your webhook in order to make sure the payload is sent from GitHub. You can enable it by running pullup-webhook
with GITHUB_SECRET
environment variable. For example: