Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Cinch Plugin to let bots interact with Github
Ruby
Branch: master
Pull request Compare This branch is 5 commits behind achiu:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib/cinch/plugins
test
.gitignore
Gemfile
Gemfile.lock
LICENSE
README.md
Rakefile
cinch-github.gemspec
test.watchr

README.md

Cinch-Github

The Cinch Github Plugin. Give your cinch bot abilities to interact with Github! This is still in its early phases!

Installation

if you haven't already...

$ gem install cinch

then install this gem.

$ gem install cinch-github

Cinch::Plugins::Github

Issues

This plugin manages interaction between Github issues via the Github API.

Configuration

To setup the Issue plugin to work with your cinch bot, we'll need to provide some info like so:

Cinch::Plugins::Github::Issue.configure do |c|
  c.user    = 'achiu'                   # your github username
  c.token   = 'some_token'              # your github API token
  c.author  = 'padrino'                 # your repository author
  c.repo    = 'padrino-framework'       # your repository name
end

Commands

  • !issue state [open|closed] [query] - returns issues that have state open or closed matching the query
  • !issue find [query] - returns issues matching the query. defaults to state open
  • !issue link [number] - returns issue link for issue number(must be digits)
  • !help github issue - returns commands for Github Issue

Integration with Cinch

It's simple. follow the guide on cinch or do something like:

# mybot.rb
require 'cinch'
require 'cinch/plugins/github'

Cinch::Plugins::Github::Issue.configure do |c|
  c.user    = 'achiu'                   # your github username
  c.token   = 'some_token'              # your github API token
  c.author  = 'padrino'                 # your repository author
  c.repo    = 'padrino-framework'       # your repository name
end

bot = Cinch::Bot.new do
  configure do |c|
    c.server           = "irc.freenode.net"
    c.nick             = "cinch"
    c.channels         = ["#padrino"]
    c.plugins.plugins  = [Cinch::Plugins::Github::Issue]
  end

end

bot.start

Finally, run your bot.

ruby -rubygems mybot.rb

And there you go!

TODO

  • finish the other plugins for rest of Github API
Something went wrong with that request. Please try again.