Skip to content

Instantly share code, notes, and snippets.

@niklasvincent
Created February 19, 2013 16:00
Show Gist options
  • Select an option

  • Save niklasvincent/4987158 to your computer and use it in GitHub Desktop.

Select an option

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
Copy Markdown

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