Skip to content

tins2831/git-notif

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Git-Notif

Sends messages to a Discord webhook whenever you make a new commit to your local git repository.

Requirements

Usage

Recommended installation

Use the install-git-notif installer script to install git-notif automatically into your git hooks directory. There is an environment variable that install-git-notif reads which will automatically set the webhook ID and token when it sets up your configuration file:

$ DISCORD_WH_URL="https://discord.com/api/webhooks/8378377823423423423/qwertyuiop" ./install-git-notif -u

If -u|--update-webhook is not in the command line arguments, then the installer script will not update the existing webhook details. The installer script will also append .wh_config.json to the project-level .gitignore file, creating it if it doesn't exist.

Manual installation

Drop notifier.py into your git hooks directory (by default, it's .git/hooks) and rename the file to post-commit. Update post-commit's permissions to allow it to be executable: chmod 755 post-commit.

There is a configuration file (.wh_config.json) that's generated at the project level when the tool is first ran. You must edit this file and add your webhook's ID and token:

https://discord.com/api/webhooks/{id}/{token}

Sample

Sample image

About

Sends messages to a Discord webhook whenever you make a new commit to your local git repository.

Topics

Resources

License

Stars

Watchers

Forks