diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2010-09-28 15:13:56 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2010-09-28 15:13:56 +0200 |
commit | 241e516d2ff93690fd1ae1ddd2049b289c5afeba (patch) | |
tree | b79195369079643ec61f3a3c870d1d09d56e5994 | |
parent | 620333a07e91c4885dec469e5382d8d242a3a34e (diff) |
Added the tags command to list repo tags.
-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 |