README.md
November 5, 2025 ยท View on GitHub
GitHub EventListener
Creates an EventListener that listens for GitHub webhook events.
Try it out locally:
-
To create the GitHub trigger and all related resources, run:
kubectl apply -f . -
Port forward:
kubectl port-forward service/el-github-listener 8080 -
Test by sending the sample payload.
curl -v \ -H 'X-GitHub-Event: pull_request' \ -H 'X-Hub-Signature-256: sha256=c26dd919ebe335852219c49f74c4b24f1c62c93c77294be3ac6d8f2e4691a023' \ -H 'Content-Type: application/json' \ -d '{"action": "opened", "pull_request":{"head":{"sha": "28911bbb5a3e2ea034daf1f6be0a822d50e31e73"}},"repository":{"clone_url": "https://github.com/tektoncd/triggers.git"}}' \ http://localhost:8080The response status code should be
202 AcceptedHMACtool used to create X-Hub-Signature-256.In
HMACstringis the body payload ex:{"action": "opened", "pull_request":{"head":{"sha": "28911bbb5a3e2ea034daf1f6be0a822d50e31e73"}},"repository":{"clone_url": "https://github.com/tektoncd/triggers.git"}}andsecretKeyis the given secretToken ex:1234567. -
You should see a new TaskRun that got created:
kubectl get taskruns | grep github-run-