blob: 5bda671318a30c945864962e1bd2e98b27b9795d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
#!/bin/sh
reponame=$(basename $(git rev-parse --absolute-git-dir) .git)
while read old new ref; do
ccount=$(git rev-list "$new" ^"$old" | wc -l)
s="s"
[ "$ccount" -eq 1 ] && s=
echo "$reponame: $ref: $ccount commit$s (https://g.gh0.pw/${reponame}/)"
git log --format='format: %h %an - %s' "$new" ^"$old" | sed -e '$a\'
done | while IFS= read line; do
echo "$line" | nc -Uu -q0 /srv/apiobot/ch/a.sock
echo "$line"
done
|