incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [17/50] git commit: [#6622] ticket:435 Add newline at the begining of ticket comments
Date Fri, 15 Nov 2013 15:42:42 GMT
[#6622] ticket:435 Add newline at the begining of ticket comments

After 'Originally posted by' in ticket comments should be extra newline.
Without it some markup doesn't properly converted (e.g. code blocks).


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/4b7b2b0c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/4b7b2b0c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/4b7b2b0c

Branch: refs/heads/cj/6777
Commit: 4b7b2b0c21f6ec19170cde47ab68b8cbc3717ccb
Parents: d2d337b
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Mon Oct 14 17:23:31 2013 +0300
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Wed Nov 13 17:16:56 2013 +0000

----------------------------------------------------------------------
 ForgeImporters/forgeimporters/github/tracker.py            | 2 +-
 ForgeImporters/forgeimporters/tests/github/test_tracker.py | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/4b7b2b0c/ForgeImporters/forgeimporters/github/tracker.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/github/tracker.py b/ForgeImporters/forgeimporters/github/tracker.py
index c2141ce..5e3c134 100644
--- a/ForgeImporters/forgeimporters/github/tracker.py
+++ b/ForgeImporters/forgeimporters/github/tracker.py
@@ -180,7 +180,7 @@ class GitHubTrackerImporter(ToolImporter):
         for comment in extractor.iter_comments(issue):
             body, attachments = self._get_attachments(comment['body'])
             if comment['user']:
-                posted_by = u'*Originally posted by:* {}\n'.format(
+                posted_by = u'*Originally posted by:* {}\n\n'.format(
                     self.get_user_link(comment['user']['login']))
                 body = posted_by + body
             p = ticket.discussion_thread.add_post(

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/4b7b2b0c/ForgeImporters/forgeimporters/tests/github/test_tracker.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/tests/github/test_tracker.py b/ForgeImporters/forgeimporters/tests/github/test_tracker.py
index 43a3bb6..bac2a1a 100644
--- a/ForgeImporters/forgeimporters/tests/github/test_tracker.py
+++ b/ForgeImporters/forgeimporters/tests/github/test_tracker.py
@@ -138,7 +138,7 @@ class TestTrackerImporter(TestCase):
         importer.github_markdown_converter = GitHubMarkdownConverter('user', 'project')
         importer.process_comments(extractor, ticket, issue)
         self.assertEqual(ticket.discussion_thread.add_post.call_args_list[0], mock.call(
-                text='*Originally posted by:* [me](https://github.com/me)\nhello',
+                text='*Originally posted by:* [me](https://github.com/me)\n\nhello',
                 timestamp=datetime(2013, 8, 26, 16, 57, 53),
                 ignore_security=True,
             ))
@@ -226,6 +226,7 @@ def hello(name):
     print "Hello, " + name
 ```'''
         body_converted = '''*Originally posted by:* [me](https://github.com/me)
+
 Hello
 
 ~~~~


Mime
View raw message