Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/eins78/git-nag

nag people by mail if they have not committed to a git repo recently
https://github.com/eins78/git-nag

Last synced: about 1 month ago
JSON representation

nag people by mail if they have not committed to a git repo recently

Awesome Lists containing this project

README

        

# git-nag

###### nag people by mail if they have not committed to a git repo recently

---

## Synopsis

git-nag "/path/to/git/repo" "[email protected]" "4hours"

Enter the git repository, git-pull from the default remote, ask git-log for if
someone with the email "[email protected]" has committed anything in the last 4 hours.
If no commits were found, send an email saying so to the same email address.

## Installation & Usage

git-nag depends on `nail` to send email. make shure it is installed (or change the script).

$ [[ $(which nail) ]] && echo "HAZ nail" || echo "NO nail :("

next, populate `/etc/default/git-nag` with info on how to send the mails:

NAG_SENDER="[email protected]"
NAG_SMTP_HOST="smtp.example.com:587"
NAG_SMTP_USER="[email protected]"
NAG_SMTP_PASSWD="sUp3rsEcrETpaSSw0rD"

eg. like so:

sudo sh -c 'echo -e "NAG_SENDER="[email protected]" \nNAG_SMTP_HOST="smtp.example.com:587" \nNAG_SMTP_USER="[email protected]" \nNAG_SMTP_PASSWD="sUp3rsEcrETpaSSw0rD"" > /etc/default/git-nag2'

git-nag is called with 3 parameters:

git-nag "/path/to/git/repo" "[email protected]" "4hours"
git-nag "/path/to/git/repo" "[email protected]" "5minutes"
git-nag "/path/to/git/repo" "[email protected]" "2weeks"

Nobody wants to check manually, so it should be run from cron

$ crontab -e
# m h dom mon dow command
0 12,16 * 8,9 1-5 git-nag "/path/to/git/repo" "[email protected]" "4hours" >/dev/null

This would run at 12 and 4pm, on every weekday in August and September, checking if someone with a matching email commited something in the 4 hours before the run.

I actually use it with [cronic](http://habilis.net/cronic/):

0 12,16 * 8,9 1-5 cronic git-nag "/path/to/git/repo" "[email protected]" "4hours"