diff options
-rwxr-xr-x | gitnoti.py | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -297,6 +297,20 @@ class Bot(irc.IRCClient): reponame = os.path.splitext(os.path.basename(repo.working_dir))[0] self.msg(target, '\002%s\002 has branches %s' % (reponame, ', '.join(['\002%s\002' % h.name for h in repo.heads]))) + elif cmd == 'tags': + if not len(messagelist) == 3: + self.msg(target, 'Usage: %s tags REPO' % self.nickname) + return + + repo = self.get_repo(messagelist[2].lower(), target) + if not repo: + return + + reponame = os.path.splitext(os.path.basename(repo.working_dir))[0] + if not len(repo.tags): + self.msg(target, '\002%s\002 has no tags.' % reponame) + else: + self.msg(target, '\002%s\002 has tags %s' % (reponame, ', '.join(['\002%s\002' % t.name for t in repo.tags]))) class BotFactory(protocol.ReconnectingClientFactory): protocol = Bot |