This is a relay server that shows more commit info for Discord webhooks.
The webhook is exactly like the Discord's Github-Compatible webhook but includes:
x
file changes,x
additions,x
deletions per commit.- Hyperlink for commit author.
- Can show info for up to around 5000 commits instead of max 5 per push.
- Repository's owner name in the embed's title.
- Run
git clone https://github.com/imptype/github-discord-webhook
to clone this repository. - Run
cd github-discord-webhook
to go into the right folder. - Run
curl -fsSL https://get.deta.dev/space-cli.sh | sh
in Terminal to install Space CLI. - Run
space login
and enter your access token when prompted.- Access Tokens can be generated from https://deta.space -> Settings.
- Run
space new
and enter an app name. - Run
space push
to upload the files to Deta Space. - Go to https://deta.space and update the environemnt variables in your app's settings.
DISCORD_WEBHOOK_URL
is https://discord.com/api/webhooks/{id}/{token}- Edit Discord channel -> Integrations -> New webhook -> Copy webhook URL
GITHUB_ACCESS_TOKEN
is text that looks likegithub_pat_{token}
, required if repo's are private.- Github settings -> Developer settings -> Personal access tokens -> Generate new token -> Set
Contents
permission to read-only -> Click generate -> Copy the token text.
- Github settings -> Developer settings -> Personal access tokens -> Generate new token -> Set
- Set the repo's
push
event webhook to point to this page of the app's URL: https://{app_name}-1-{a1234567}.deta.space/github- Repo settings -> Webhooks -> Add new webhook -> Write in
Payload URL
- URL can be found/opened by clicking on your app in https://deta.space.
- And change the webhook's
Content type
toapplication/json
.
- Repo settings -> Webhooks -> Add new webhook -> Write in
Coming soon to Discovery...?