#435 provide github importer
Closed: Fixed 7 years ago Opened 8 years ago by kevin.

It would be great if we had a way for a project to import issues and git repos from github with just a selection of project.

I'm not sure if it could preserve issue reporters or the like, but it would be awesome if it could.


Might help to use https://pagure.io/libpagure and to work with @yangl1996 who already has some experience in syncing data from github to pagure and vice-versa

For resolving this issue - pagure-importer Currently, it works for importing github issues. You need to have the pagure api key for your project. You have option to import all/open/closed tickets.

Just a small FYI that I found a way to retrieve a github user's email address, using the patch export method: https://github.com/pypingou/pagure/commit/0c320766196c78d4f430217221ff7d28a9af965e.patch

I have no idea how this would scale, but maybe worth a try :)

@pingou, I am not sure about this method or maybe i am missing something. But, the we need to find the issue-comment-user's email id and this method is using commit patch.
The problem we are facing is: we are getting email id for the person who created the issue but not for all the people who have commented on that issue. Among all the people who have commented, we are getting the email for the reporter of the issue and the guy who is executing the pgimporter. Check this

We could start by finding out all the users who commented on a ticket and have contributed to the project (so we can get their email id from their commit).
For the other ones, we could check if they have projects hosted on github, then try to find projects they committed in and get their emails from there.

It means quite a bit of pre-processing but at least we may be able to get most user's email this way (and warn for the users for which we do not have an email address).

I was trying to avoid this method from the beginning, but it seems it is the only method possible. :/

It would have been nicer if we could have, clearly.

We may want to make this a two steps process:

  • pre-process the github project and compile a list of user/email (maybe in JSON or so)
  • process the github project using the JSON provided

This might also allow to edit the JSON files by hand in b/w the two steps allowing user to add/edit the email addresses missing if they know it.

pagure-importer seems to be fairly complete now yes? if so then i am wondering why is this issue still open - especially as it is marked as "easy fix"

i havent looked too closely at it but i may try to adapt it if it is working or finish it is it is not working

As of now, the github importer doesn't support attachments and assignees of the issue. Rest works fine.

@vivekanand1101 should we open the corresponding issues on pagure-importer and close this ticket then?

Alright, let's close then

Thanks @cverna, @vivekanand1101 and thanks to everyone who contributed to pagure-importer!

@pingou changed the status to Closed

7 years ago

Metadata Update from @vivekanand1101:
- Issue untagged with: easyfix

7 years ago

Login to comment on this ticket.

Metadata