Sha256: eeebe94d5ccdf2768688a12176934557acc2002f6905bba6bcdca251660cf959
Contents?: true
Size: 608 Bytes
Versions: 28
Compression:
Stored size: 608 Bytes
Contents
module Lita module GithubPrList class AliasUser attr_accessor :response, :redis def initialize(params = {}) self.response = params.fetch(:response, nil) self.redis = params.fetch(:redis, nil) raise "invalid params in #{self.class.name}" if response.nil? || redis.nil? end def create_alias github_username, hipchat_username = response.matches.first[0], response.matches.first[1] redis.set("alias:#{github_username}", hipchat_username) response.reply "Mapped #{github_username} to #{hipchat_username}" end end end end
Version data entries
28 entries across 28 versions & 1 rubygems