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

Overview

Git-Notif

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

Usage

Just 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.

Optionally, you may use the following installer script to install this script automatically into your git hooks directory:

#!/usr/bin/env bash

CURL_LOC=$(which curl)

if [[ $? -ne 0 ]]; then
    if [[ -z $1 ]]; then
        echo "[ - ] Failed to locate cURL." 1>&2
        echo "[ - ] Make sure cURL is installed and available." 1>&2
        echo "[ - ] Alternatively, you may pass this script a valid location to a cURL binary as it's first argument." 1>&2
        exit 1
    fi

    if [[ $($1 -V | grep -Eo "^curl") != "curl" ]]; then
        echo "[ - ] ${1} is not a valid cURL binary." 1>&2
        exit 1
    fi

    CURL_LOC=$1
fi

if [[ -z $GIT_DIR ]]; then
    GIT_DIR=".git"
fi

# ensure we're inside a git repository.
if [[ $(find . -maxdepth 1 -type d -name $GIT_DIR -printf "%P" | tr -d "\n") != $GIT_DIR ]]; then
    echo "[ - ] No git directory found." 1>&2
    echo "[ - ] Make sure you're inside a git repository." 1>&2
    exit 1
fi

HOOKS_DIR=$(git config core.hooksPath)
if [[ -z $HOOKS_DIR ]]; then
    HOOKS_DIR=$GIT_DIR/hooks
fi

# ensure we have rw perms on the hooks dir.
if [[ ! -r $HOOKS_DIR ]] || [[ ! -w $HOOKS_DIR ]]; then
    echo "[ - ] Unable to access ${HOOKS_DIR}." 1>&2
    exit 1
fi

cd $HOOKS_DIR
$CURL_LOC https://raw.githubusercontent.com/tins2831/git-notif/master/notifier.py --output post-commit

chmod 755 post-commit

echo "[ + ] Installed."

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

Its Is A Telegram Maths Basic Calculator Bot

Its Is A Telegram Maths Basic Calculator Bot

ANKIT KUMAR 1 Dec 26, 2021
AWS Blog post code for running feature-extraction on images using AWS Batch and Cloud Development Kit (CDK).

Batch processing with AWS Batch and CDK Welcome This repository demostrates provisioning the necessary infrastructure for running a job on AWS Batch u

AWS Samples 7 Oct 18, 2022
Unofficial Python wrapper for official Hacker News API

haxor Unofficial Python wrapper for official Hacker News API. Installation pip install haxor Usage Import and initialization: from hackernews import H

147 Sep 18, 2022
Telegram bot to extract text from image

OCR Bot @Image_To_Text_OCR_Bot A star ⭐ from you means a lot to us! Telegram bot to extract text from image Usage Deploy to Heroku Tap on above button

Stark Bots 25 Nov 24, 2022
Easy and simple, Telegram Bot to Show alert when some edits a message in Group

Edit-Message-Alert Just a simple bot to show alert when someone edits a message sent by them, Just 17 Lines of Code These codes are for those who incu

Nuhman Pk 6 Dec 15, 2021
Python bindings for Alexa Web Information Service (AWIS) API

Attention! This package is no longer maintained. See this ticket for more info. Wraps Alexa Web Information Service. Usage Making UrlInfo requests: ap

Atamert Ölçgen 51 Feb 12, 2022
PyManGenerator is a token generator for discord, it joins servers using webbot to automate everything

PyManGenerator is a token generator for discord, it joins servers using webbot to automate everything. Captcha can be done by itself unless you used your current IP Address more than once.

5 Nov 27, 2021
:evergreen_tree: Python module for communicating with the Taiga API

python-taiga A python wrapper for the Taiga REST API. Documentation: https://python-taiga.readthedocs.io/ Usage: : https://python-taiga.readthedocs.io

Nephila 87 Oct 12, 2022
Simple spam bot made in python

Simple Spam Bot A Simple and easy way to be the most hated person between your friends, All you have to do is spam the group chat using this bot until

Kareem Osama 6 Sep 05, 2022
Throttle and debounce add-on for Pyrogram

pyrothrottle Throttle and debounce add-on for Pyrogram Quickstart implementation on decorators from pyrogram import Client, filters from pyrogram.type

7 Oct 01, 2022
Social Framework

Social Int Framework Social Int Framework its a Selenium script that scrape the IG photos and do a Reverse search on google and yandex for finding ano

29 Dec 06, 2022
API which returns cusswords , can be used to check cusswords in bots etc.

Anti-abuse-api-flask API which returns cusswords , can be used to check cusswords in bots etc. Run pip install -r requirements.txt py app.py API Endpo

8 Jan 03, 2023
A Bot To Find Telegram User ID Easily

Telegram ID Bot 🤖 A Bot To Find Telegram User ID Easily Made with Python3 (C) @BXBotz Copyright permission under MIT License License - https://githu

MuFaz-TG 6 Nov 21, 2022
Auto-updater for the Northstar Titanfall 2 client

northstar-updater Auto-updater for the Northstar Titanfall 2 client Usage Put the exe into your Titanfall 2 directory next to Titanfall2.exe Then, whe

7 Nov 25, 2022
Play Video & Music on Telegram Group Video Chat

Video Stream is an Advanced Telegram Bot that's allow you to play Video & Music on Telegram Group Video Chat 🧪 Get SESSION_NAME from below: Pyrogram

Sehath Perera 1 Jan 17, 2022
OpenEmu Discord Rich Presence provided with Python!

A simple application that provides your current OpenEmu game as an RPC state in Discord via PyPresence. How to use Unzip and open the latest x86_64 ve

Deltaion Lee 6 May 30, 2022
SOCMINT tool to get personal infos from an Instagram account via analysis of its followers and/or following

S T E R R A 🔭 A SOCMINT tool to get infos from an Instagram acc via its Followers / Following Allows you to analyse someone's followers, following, a

aet 316 Dec 28, 2022
A collection of discord tools I've made.

Discord A collection of discord tools i've made. What's in here? Basically every discord related project i've worked on can be found here, i'll try an

?? ?? ?? 6 Nov 13, 2021
If you only have hash, you can still operate exchange

PTH Exchange If you only have hash, you can still operate exchange This project module is the same as my other project Exchange_SSRF, This project use

Jumbo 37 Dec 26, 2022
AnyAPI is a library that helps you to write any API wrapper with ease and in pythonic way.

AnyAPI AnyAPI is a library that helps you to write any API wrappers with ease and in pythonic way. Features Have better looking code using dynamic met

Fatih Kilic 129 Sep 20, 2022