Last active
July 26, 2016 01:57
-
-
Save elifoster/5bd78d57f972656fbbadcd11774aeb13 to your computer and use it in GitHub Desktop.
A simple script to add the issues event to the IRC service on a repository.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'octokit' | |
# Enter your login stuff and uncomment accordingly. | |
# @kit = Octokit::Client.new(access_token: 'token') | |
# @kit = Octokit::Client.new(login: 'user', password: 'password') | |
# Adds the issues event to the IRC web service for the repository. | |
# @param repo [String] The full repository name (e.g., elifoster/seedcopy) | |
# @return [void] | |
def irc(repo) | |
id = nil | |
@kit.hooks(repo).each do |hook| | |
id = hook[:id] if hook[:name] == 'irc' | |
end | |
@kit.edit_hook(repo, id, 'irc', {}, { add_events: ['issues'] }) | |
end | |
# Enter your repository accordingly. | |
irc('username/repository') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment