Since the Google Data API for Issues is deprecated and was scheduled to be shut down already (June 14th, 2013), we'll need to create an implementation using the CSV list and scraping to ensure that the Google Code importer continues to work.
The importer should follow the framework discussed on the mailing list and integrate with the project importer from [#6456].
The list of tickets and their metadata can be retrieved via the CSV export list, e.g., https://code.google.com/p/modwsgi/issues/csv but the ticket body and comments will need to be scraped from the web interface. The description and comments can be retrieved from, e.g., https://code.google.com/p/modwsgi/issues/detail?id=22 by iterating over the items with `id="hc\d+"` or `class="issuedescription|issuecomment"`.
The description and comments on issues don't support wiki syntax or HTML, so we can just convert them to text. User mapping will have the same issues, so whatever we end up doing in [#6461] will apply here.
Diff:
Related
Tickets:
#6456Tickets:
#6461Why did you add a bunch of space to that line?
Not sure why my comment didn't post when I changed the status (got a random 500), but here it is:
allura:cj/6464
I will probably add more tests with some actual HTML data but this is working and ready for review.
Failure against https://code.google.com/p/google-code-feed-gadget/issues/detail?id=1 and http://code.google.com/p/modwsgi/issues/detail?id=11
Would we want to convert # of stars to # of upvotes?
Fields for type, priority, opsys, component (more possible?) should be added as custom fields and converted.
Need to use
skip_mod_date
(grep for examples) to preserve the mod_date you set.Need to disable notifications. googlecodewikiimporter does this already, and for the Trac importer I suggested looking at a way to make it happen for all importers.
Need to call g.post_event('project_updated')
Everything is done as the current user. Would it be better to do it as *anonymous? That's what some of our other importers do.
Since GC tickets and comments are plain text, whitespace is significant and should be preserved. Also special markdown chars need to be escaped. E.g. http://code.google.com/p/modwsgi/issues/detail?id=1 and http://code.google.com/p/modwsgi/issues/detail?id=4#c5 To do so, use
forgeblog.command.rssfeeds.plain2markdown()
That needs html2text which is GPL'd, so make sure you handle the lack of html2text gracefully. (And if you refactorplain2markdown
to a more generic place, make sure you update SF's forge-classic code reference to it)Comments aren't posted on the Allura ticket in sequential order. They seem random.
Attachment on a comment didn't get imported (from modwsgi #1)
Changes force-pushed to:
allura:cj/6464
Needs to be rebased, there are some significant conflicts with master.
And then check to see if https://pypi.python.org/pypi/GoogleCodeWikiImporter needs corresponding changes too.
Better to call
h.plain2markdown(..., preserve_multiple_spaces=True)
thanh.plain2markdown(..., True)
ForgeBlog/forgeblog/tests/test_commands.py:test_plain2markdown should be moved to Allura's helper test file. And would be very good to have a test case for the
\\
you added tomd_chars_matcher_all
(was it just a typo fix?)Our internal forge-classic repo needs changes to correspond to the plain2markdown/re_preserve_spaces changes.
allura:cj/6464
forge-classic:cj/6464
googlecodewikiimporter:cj/6464
Force-pushed.
allura:cj/6464
forge-classic:cj/6464
googlecodewikiimporter:cj/6464
over-encoded summary lineFixes pushed.
Oh man, that's nice to see. :-)