EDICOGNE / support-tools

Automatically exported from code.google.com/p/support-tools
Apache License 2.0
0 stars 0 forks source link

GitHub issues import and usernames #28

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

Is there any possibility to use "proper" user names in the issues (and 
comments) once imported to GitHub? Currently all the issues and comments belong 
to the repository owner, which makes then mostly useless...

Thanks,

Nico

Original issue reported on code.google.com by nicolas@guillaumin.me on 14 Mar 2015 at 7:35

GoogleCodeExporter commented 9 years ago
Something else: For each issue there's a text inserted like "Originally created 
by X" and for each comment "Originally commented by Y" or something. It seems 
this is always set to the repository owner, regardless of the original names 
that are in the Google Code JSON export.

I understand if the GitHub API doesn't allow impersonating users for 
commenting, but if at least those message had the proper authors that would 
help.

Original comment by nicolas@guillaumin.me on 14 Mar 2015 at 8:15

GoogleCodeExporter commented 9 years ago
Could you please link an example where the converted issue on GitHub isn't 
setting the "created by X" information correctly? (That is, where on GitHub it 
says the comment was created by X and on Google Code it was created by Y?)

As for whether or not to impersonate GitHub users and upload comments as them, 
the Google Code Exporter does not support that feature by design.

Original comment by chrsm...@google.com on 14 Mar 2015 at 10:47

GoogleCodeExporter commented 9 years ago
I'll try, but my importing fail because of the rate limiting (even enabled it 
seems it's not limiting enough) so I deleted the repo. I'll try again.

Original comment by nicolas@guillaumin.me on 15 Mar 2015 at 12:08

GoogleCodeExporter commented 9 years ago
Here's an example:
* Original issue: 
https://code.google.com/p/osmtracker-android/issues/detail?id=1
* Imported one: 
https://github.com/nguillaumin/osmtracker-android-import-test/issues/1

The JSON looks ok as far as I can tell:

        "kind" : "projecthosting#issue",                                                                                                                                                 
        "id" : 1,                                                                                                                                                                        
        "title" : "Hardware back button doesn't behave as expected",                                                                                                                     
        "summary" : "Hardware back button doesn't behave as expected",                                                                                                                   
        "stars" : 3,                                                                                                                                                                     
        "starred" : false,                                                                                                                                                               
        "status" : "Fixed",                                                                                                                                                              
        "state" : "closed",                                                                                                                                                              
        "labels" : [ "Type-Defect", "Priority-Medium", "Usability" ],                                                                                                                    
        "author" : {                                                                                                                                                                     
          "kind" : "projecthosting#issuePerson",                                                                                                                                         
          "name" : "david.ebling",                                                                                                                                                       
          "htmlLink" : "https://code.google.com/u/102551361964087564554/"                                                                                                                
        },                                                                                                                                                                               
        "owner" : {                                                                                                                                                                      
          "kind" : "projecthosting#issuePerson",                                                                                                                                         
          "name" : "nguillaumin",                                                                                                                                                        
          "htmlLink" : "https://code.google.com/u/105810118765666299774/"                                                                                                                
        },             

And a comment:

           {                                                                                                                                                                           
            "id" : 1,                                                                                                                                                                    
            "kind" : "projecthosting#issueComment",                                                                                                                                      
            "author" : {                                                                                                                                                                 
              "kind" : "projecthosting#issuePerson",                                                                                                                                     
              "name" : "david.ebling",                                                                                                                                                   
              "htmlLink" : "https://code.google.com/u/102551361964087564554/"                                                                                                            
            },                                                                                                                                                                           
            "content" : "Sorry, think I'm on version 0.2.1 actually - I have button icons. An \"about\" option\r\non the menu button alongside settings will make bug reporting much easier :)",                                                                                                                                                                                  
            "published" : "2010-02-24T22:38:22.000Z",                                                                                                                                    
            "updates" : {                                                                                                                                                                
              "kind" : "projecthosting#issueCommentUpdate"                                                                                                                               
            },                                                                                                                                                                           
            "canDelete" : true                                                                                                                                                           
          },

The command I used:

python2 ./support-tools/googlecode-issues-exporter/github_issue_converter.py 
--github_oauth_token `cat token.txt` --github_owner_username nguillaumin 
--github_
repo_name osmtracker-android-import-test --issue_file_path 
GoogleCodeProjectHosting.json --project_name osmtracker-android

Thanks!

Original comment by nicolas@guillaumin.me on 15 Mar 2015 at 12:14

GoogleCodeExporter commented 9 years ago
Hm, it seems that by using the exporter wizard people are getting different 
results, with GitHub issues belonging to GoogleCodeExporter and with comments 
properly attributed. I guess the support tool script might not be what the 
exporter wizard uses?

My problem is that I can't use the exporter wizard because my GitHub repository 
already exists (I migrated the source code to GitHub a long time ago), that's 
why I'm using the issue exporter tool separately to import just the issues...

Original comment by nicolas@guillaumin.me on 15 Mar 2015 at 12:19

GoogleCodeExporter commented 9 years ago
+1 
I have the same problem. I need to go through every single comment now to make 
the proper user appear :( Unfortunately I do not think there is a way to redo 
this without adding functionality to force the importer to be able to redo a 
specific issue. 

Original comment by hans.bec...@gmail.com on 15 Mar 2015 at 1:46

GoogleCodeExporter commented 9 years ago
I'm seeing also seeing all issues being attributed to the repo owner when 
importing issues into BitBucket. Moreover, the link to the original comment #, 
as in…

  "Comment [#%s](%s) originally posted by %s on %s:\n\n%s"

…does not carry over correctly in BitBucket. The link instead leads to an 
issue by the comment #.

Original comment by azizatif on 16 Mar 2015 at 8:35

GoogleCodeExporter commented 9 years ago

Original comment by jasonhall@google.com on 16 Mar 2015 at 8:53

GoogleCodeExporter commented 9 years ago
Yeah it seems the automated wizard works great (however that only works for new 
repositories).

Tried the self tools, but all comments were reported owned by me. Even though 
the JSON takeout download had the correct usernames provided.

Original: https://code.google.com/p/android-apktool/issues/detail?id=2
Imported: https://github.com/iBotPeaches/Apktool/issues/112

Original comment by connor.tumbleson on 17 Mar 2015 at 10:53

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago

Original comment by sstrickr...@googlemail.com on 11 Apr 2015 at 9:19

Attachments: