Relaying Webhooks

Relaying GitHub Webhooks to a Local Controller

GitHub 29 should push events to Jenkins 8,793 ' /github-webhook/ endpoint, but this controller listens on 127.0.0.1 inside WSL 6 , out of GitHub's reach. For development, smee.io relays them: GitHub posts to a public channel URL, and the smee-client Node.js 2,131 program (github.com/probot/smee-client (https://github.com/probot/smee-client 558 )), running next to Jenkins, holds a server-sent-events connection to the channel and replays each delivery locally:

A smee.io channel, the relay, and the repository webhookGroovy
SMEE=$(curl -s -o /dev/null -w '%{redirect_url}' https://smee.io/new)
setsid nohup npx --yes smee-client@5.0.0 --url "$SMEE" \
  --target 'http://localhost:32080/github-webhook/?relay=smee' > smee.log 2>&1 < /dev/null &
gh api -X POST repos/binarybehemoth/booknest-jenkins/hooks \
  -f name=web -F active=true -f 'events[]=push' -f 'events[]=pull_request' \
  -f "config[url]=$SMEE" -f 'config[content_type]=json' \
  --jq '{id, active, events, url: .config.url}'
Output
{"active":true,"events":["push","pull_request"],"id":685669033,"url":"https://smee.io/ozWOWLoNj
  5NrRCKT"}

The ?relay=smee is a workaround found the hard way: smee-client 5.0.0 strips a trailing slash from its target, Jenkins answers POST /github-webhook with a redirect, and the client follows it as a GET, so every delivery failed with 405. The next push to the pull request's branch went through:

The relay's log and the multibranch events log after a pushShell
tail -2 smee.log
docker exec l2-jenkins grep -a 'event to branch feature.*UPDATED' \
  /var/jenkins_home/jobs/booknest/indexing/events.log | tail -1 | cut -c1-95
Output
POST http://localhost:32080/github-webhook/?relay=smee - 200
POST http://localhost:32080/github-webhook/?relay=smee - 200
[Fri Sep 25 15:31:19 UTC 2026] Push event to branch feature/ci-notes in repository binarybehemo

Both deliveries arrived within a second, and PR-1 build 2 started with the cause "Pull request #1 updated". Afterward the webhook was deleted (gh api -X DELETE .../hooks/685669033) and the relay stopped.