A Swift webhook handler which designed to translate and forward Github Webhook to Other Webhook.
Currently Albatross supports Feishu only.
Albatross Docker Image was build by Github Action and published to Github Packages.
Pull image from the command line:
docker pull ghcr.io/kevinzhow/albatross:latest- ping
- pull_request_review_comment
- issues
- issue_comment
- commit_comment
- pull_request
- create
- push
Download docker-compose.yml template here.
# albatross
version: "3.7"
services:
app:
image: ghcr.io/kevinzhow/albatross:latest
restart: unless-stopped
environment:
LOG_LEVEL: ${LOG_LEVEL:-debug}
ADMIN_USERNAME: albatross
ADMIN_PASSWORD: albatross
ports:
- "1780:8080"
volumes:
- ./data:/app/data/
#user: root # uncomment to run as root if you runs docker-compose as root
command:
[
"serve",
"--env",
"production",
"--hostname",
"0.0.0.0",
"--port",
"8080",
]docker-compose up
If you want to enable build-in TLS supports, please modify the docker-compose.yml as follows
environment:
ENABLE_TLS: "true"
volumes:
- ./data:/app/data/
- /path/to/cert.pem:/app/certs/cert.pem
- /path/to/key.pem:/app/certs/key.pemAlbatross uses Basic Auth with default username albatross and password albatross
curl --location --request POST 'https://yourdomain.com/hook/feishu' \
--header 'Authorization: Basic YWxiYXRyb3NzOjM1MmFkNWEyOTNjN2ExYzM4YmUyODk2NWFlNWExNjQ1' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'title=webhook-name' \
--data-urlencode 'url=https://open.feishu.cn/open-apis/bot/v2/hook/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx'Record your {webhook-handler-id}.
{
"url": "https://open.feishu.cn/open-apis/bot/v2/hook/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"id": "{webhook-handler-id}",
"title": "webhook-name",
"secret": null
}Fill your github webhook form
| Field | Value |
|---|---|
| Payload URL | https://yourdomain.com/hook/feishu/{webhook-handler-id} |
| Content type | application/json |
| SSL verification | Enable SSL verification |