Skip to content

Instantly share code, notes, and snippets.

@BlackMaria
Last active August 27, 2015 18:29
Show Gist options
  • Save BlackMaria/7ba2a64afba719204d88 to your computer and use it in GitHub Desktop.
Save BlackMaria/7ba2a64afba719204d88 to your computer and use it in GitHub Desktop.

Create an IRC git-hook

USERNAME=user:pass
OWNER=someguy
REPO=thing
curl -u $USERNAME -H "Accept: application/json" ${DEBUG}  https://api.github.com/repos/${OWNER}/${REPO}/hooks -d '{"config": {
      "nick": "ggl_bot",
      "port": "6667",
      "server": "chat.freenode.net",
      "room": "#SherSec"
    },
    "name": "irc",
    "events": [
      "push"
    ]
  }'

List IDs

curl -u $USERNAME -H "Accept: application/json" ${DEBUG}  https://api.github.com/repos/${OWNER}/${REPO}/hooks 

Remove ID

curl -X DELETE -u $USERNAME -H "Accept: application/json" ${DEBUG}  https://api.github.com/repos/${OWNER}/${REPO}/hooks/123123
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment