diff options
Diffstat (limited to 'gitnoti.py')
-rwxr-xr-x | gitnoti.py | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -58,11 +58,13 @@ def check_repos(bot): for i, v in enumerate(repos): repo = v[0] + if not repo.heads: # No commits + continue last = v[1] if last == None: - last = repo.commits()[0].id + last = repo.heads[0].commit.id repos[i][1] = last - nlast = repo.commits()[0] + nlast = repo.heads[0].commit if last and nlast.id != last: msg = repo_commit_msg(repo, nlast) bot.gitmsg(msg) @@ -99,7 +101,7 @@ class Bot(irc.IRCClient): repo = [r for r in repos if os.path.basename(r[0].path).startswith(repo)] if len(repo) == 1: r = repo[0][0] - msg = repo_commit_msg(r, r.commits()[0]) + msg = repo_commit_msg(r, r.heads[0].commit) self.msg(target, msg) elif len(repo) == 0: self.msg(target, 'No repo found.') |