This repository is a webhook server for github, it will send message to FeiShu group when github webhook trigger.
# If you use yarn
yarn
# If you use npm
npm install
You should config the env in .env
file, you can copy the .env.example
file to .env
and modify it.
PORT=8090
WORKFLOW_WHITELIST=["completed", "requested"]
FEISHU_URI=https://xxxx
FEISHU_SECRET=xxxxxxx
NOTE
FEISHU_URI
andFEISHU_SECRET
can get from FeiShu Bot's Webhook URI, you can refer to this documentWORKFLOW_WHITELIST
is for the workflow_run, it will send message when the workflow_run's status in the listPORT
is the server port
yarn build
yarn start
- Go to the repository you want to config the webhook
- Go to
Settings > Webhooks
- Click
Add webhook
- Add the
Payload URL
(e.g. https://www.example.com/webhook/github) - Set
Content type
toapplication/json
- DO NOT Set
Secret
- Set
Which events would you like to trigger this webhook?
toLet me select individual events.
orSend me everything.
- Now everything is ok, you can test push the code or create a pull request to test the webhook.
- Create Branch
- Delete Branch
- Commit Comment
- Pull Request
- Push Commit
- Create Issues
- Issue comment
- Pull request review comment
- Workflow run requested
- Workflow run in_progress
- Workflow run completed
To generate new schema file with openapi.yaml, run under folder path
npx openapi-typescript openapi.yaml --output ./app/schema/GeneratedSchema.ts