1.5 KiB
1.5 KiB
Git Discord Notification Hook
Send commit notifications to Discord with Korean text support.
Requirements
- Node.js (required for Korean text support)
- Download from: https://nodejs.org/
- Install the LTS version
Installation
-
Open your project folder
-
Run the setup script:
.\setup-hooks.ps1 -
Configure your Discord webhook URL:
- Open
git-hooks/send-discord.jsin a text editor (Notepad, VS Code, etc.) - Find line with
webhookUrl = - Replace the URL with your Discord webhook URL
- Save the file
- Run
.\setup-hooks.ps1again to apply changes
- Open
That's it! Now every commit will send a notification to Discord.
How to Get Discord Webhook URL
- Open your Discord server settings
- Go to Integrations → Webhooks
- Click New Webhook
- Copy the Webhook URL
- Paste it into
git-hooks/send-discord.js
What Gets Sent to Discord
- Commit hash
- Author name
- Commit message (supports Korean/other languages)
- List of changed files
Troubleshooting
Hook not running?
- Make sure you ran
.\setup-hooks.ps1after cloning the repo - Check that
.git/hooks/post-commitfile exists
Korean text showing as ????
- Make sure Node.js is installed
- Run
node --versionin terminal to check
Hook sending errors?
- Verify your Discord webhook URL is correct
- Check that the webhook has permission to send messages
Uninstalling
Run this to remove the hooks:
rm .git/hooks/post-commit .git/hooks/send-discord.js