diff options
Diffstat (limited to 'gitnoti.py')
-rwxr-xr-x | gitnoti.py | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -27,7 +27,7 @@ def repo_commit_msg(repo, commit): stat += ' \00305--%d\017' % commit.stats.total['deletions'] stat += ' \00303++%d\017' % commit.stats.total['insertions'] msg = '\002%s\002 pushed to \002%s\002 by \002%s\002 (%s) %s' % ( - os.path.basename(repo.path), + os.path.splitext(os.path.basename(repo.path))[0], commit.id_abbrev, commit.committer.name if commit.author.name == commit.committer.name else '%s/%s' % (commit.committer.name, commit.author.name), stat, @@ -40,14 +40,14 @@ def check_repos(bot): repo_paths = [x for x in os.listdir(root) if x.endswith('.git')] if not repos: repos = [[git.Repo('%s/%s' % (root, x)), None] for x in repo_paths] - bot.gitmsg('Repos initialized: %s' % (', '.join([os.path.basename(x[0].path) for x in repos]))) + bot.gitmsg('Repos initialized: %s' % (', '.join([os.path.splitext(os.path.basename(x[0].path))[0] for x in repos]))) else: old_paths = [os.path.basename(x[0].path) for x in repos] new_paths = [x for x in repo_paths if not x in old_paths] for n in new_paths: repos.append([git.Repo('%s/%s' % (root, x)), None]) if new_paths: - bot.gitmsg('New repo%s: %s' % ('' if len(new_paths) == 1 else 's', ', '.join(new_paths))) + bot.gitmsg('New repo%s: %s' % ('' if len(new_paths) == 1 else 's', ', '.join([os.path.splitext(x)[0] for x in new_paths]))) for i, v in enumerate(repos): repo = v[0] @@ -82,7 +82,7 @@ class Bot(irc.IRCClient): if messagelist[0].startswith(self.nickname): cmd = messagelist[1].lower() if cmd == 'list': - s = 'Repos: %s' % ', '.join([os.path.basename(x[0].path) for x in repos]) + s = 'Repos: %s' % ', '.join([os.path.splitext(os.path.basename(x[0].path))[0] for x in repos]) self.msg(target, s) elif cmd == 'last': repo = messagelist[2].lower() if len(messagelist) > 2 else None |