cfg/bin/git-c

19 lines
458 B
Bash
Executable File

#!/bin/bash -e
### Fix committer email by repo
git setmail >/dev/null
### Commit
vault-gpg $(grep default-key ~/.gnupg/gpg.conf | cut -d ' ' -f 2)
git commit -S -v "$@"
### Count productivity habit
PROD_TASK=$(habitica https://habitica.com/api/v3/tasks/user | jq -r '.data | map(select(.text=="productivity").id)[0]')
if ! ( habitica -sS -o /dev/null -X POST https://habitica.com/api/v3/tasks/${PROD_TASK}/score/up ); then
echo "Scoring failed."
fi