Skip to content

Instantly share code, notes, and snippets.

@niklasvincent
Created February 19, 2013 16:00
Show Gist options
  • Save niklasvincent/4987158 to your computer and use it in GitHub Desktop.
Save niklasvincent/4987158 to your computer and use it in GitHub Desktop.
Add the following to ./git/hooks/post-commit and change your UID and TOKEN (obtained from the user -> settings dialog). More information here https://github.com/lefnire/habitrpg/wiki/API
# Gain XP on HabitRPG
HABITRPG_UID="xxxxx"
HABITRPG_TOKEN="yyyyyy"
curl -X POST -H 'Content-Type:application/json' \
"https://habitrpg.com/v1/users/${HABITRPG_UID}/tasks/git/up" \
-d "{\"apiToken\":\"${HABITRPG_TOKEN}\", \"title\":\"Git commit\", \"service\":\"git\", \"icon\":\"https://github.com/favicon.ico\"}" 1>/dev/null 2
>&1
@nicklasnygren
Copy link

I'm so adding this to my hook template.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment