From 275f5238015d814999b364265969622a80e5ca89 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jul 17 2014 09:11:47 +0000 Subject: Remove debugging code, add a link within the comment and fix the call to get_pusher() --- diff --git a/progit/hooks/files/progit_hook.py b/progit/hooks/files/progit_hook.py index 911d8d9..6f8703d 100644 --- a/progit/hooks/files/progit_hook.py +++ b/progit/hooks/files/progit_hook.py @@ -99,25 +99,18 @@ def relates_commit(commitid, issueid, project=None): repo = project or get_repo_name() - print issue - print repo - print issue.project.name - if issue is None or issue.project.name != repo: return - comment = ''' Commit %s relates to this ticket''' % commitid - - print comment - print issue - print get_pusher() + comment = ''' Commit `%s <../%s>`_ relates to this ticket''' % ( + commitid[:8], commitid[:8]) try: message = progit.lib.add_issue_comment( progit.SESSION, issue=issue, comment=comment, - user=get_pusher(), + user=get_pusher(commitid), ) progit.SESSION.commit() except progit.exceptions.ProgitException as err: