Skip to content

Instantly share code, notes, and snippets.

@ELLIOTTCABLE
Forked from metajack/irc.json
Last active December 17, 2015 16:39
Show Gist options
  • Save ELLIOTTCABLE/5640233 to your computer and use it in GitHub Desktop.
Save ELLIOTTCABLE/5640233 to your computer and use it in GitHub Desktop.
{
"name": "irc",
"active": true,
"events": [
"issues",
"issue_comment",
"fork",
"watch",
"push",
"create",
"delete",
"commit_comment",
"pull_request",
"pull_request_review_comment",
"deployment",
"deployment_status",
"gollum",
"member",
"public",
"release",
"status",
"team_add",
"watch"
],
"config": {
"server": "chat.freenode.net",
"port": "6667",
"room": "#CHANGEME",
"nick": "[GH]",
"ssl": "0",
"message_without_join": "1",
"no_colors": "0",
"long_url": "1",
"notice": "0"
}
}
#!/bin/bash
OTP=$1
owner=$2
repo=$3
user=CHANGEME
curl -H "X-GitHub-OTP: $OTP" -i -u $user -X POST https://api.github.com/repos/$owner/$repo/hooks --data @irc.json
@ELLIOTTCABLE
Copy link
Author

Clone this, change the room's name and your GitHub username, then run the script. It'll ask your GitHub password (this will not be saved.) The first and argument should be the name of the owning user/org, and the repository, respectively.

Your user account must have permissions to control the repo in question.

Example:

./repo_add_irc.sh elliottcable Paws.js
./repo_add_irc.sh Paws Issues

(= /ht @metajack

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