#69 Fix #68 'list' object has no attribute 'username' on pgimport push
Merged by cverna. Opened by clime.
clime/pagure-importer master  into  master

Download 69.patch

The problem is that current codebase does not dump issue/pr owners into data files (assembled_commentors.csv, issue_commentors.json), only 'commenters' (people who just commented after the issue or PR was created). But issue/PR owners are also needed for a valid issue creation. This the output of pgimport github before the commit:

 clime@coprbox ~/progress $ pgimport github
 Enter your Github Username: clime
 Password:
 Enter github project name like pypingou/pagure: verigak/progress
 Do you want to generate jsons for project's contributers and issue commentors? [y/N]: y
 contributor added: web-flow
 contributor added: aduriseti
 contributor added: verigak
 contributor added: msabramo
 contributor added: sindreij
 contributor added: nournia
 contributor added: verigak
 Maybe one of the contributors is dropped because                            of lack of details
 commentor added: verigak
 commentor added: prologic
 commentor added: lugtigheid
 commentor added: coyotebush
 commentor added: victorhooi
 commentor added: neithere
 commentor added: frewsxcv
 commentor added: simminni
 commentor added: msabramo
 commentor added: praiskup
 commentor added: saxtouri
 commentor added: farchy
 commentor added: aduriseti
 commentor added: albertferras
 commentor added: bmbouter
 commentor added: mat2py
 commentor added: clime

And this the output after the commit (all needed users are present now):

 clime@coprbox ~/progress $ pgimport github
 Enter your Github Username: clime
 Password:
 Enter github project name like pypingou/pagure: verigak/progress
 Do you want to generate jsons for project's contributers and issue commentors? [y/N]: y
 contributor added: web-flow
 contributor added: aduriseti
 contributor added: verigak
 contributor added: msabramo
 contributor added: sindreij
 contributor added: nournia
 contributor added: verigak
 Maybe one of the contributors is dropped because                            of lack of details
 commentor added: clime
 commentor added: mat2py
 commentor added: aduriseti
 commentor added: bmbouter
 commentor added: TobiX
 commentor added: gaopengpian
 commentor added: farchy
 commentor added: praiskup
 commentor added: jlec
 commentor added: Drekin
 commentor added: pjdelport
 commentor added: msabramo
 commentor added: sindreij
 commentor added: simminni
 commentor added: bkabrda
 commentor added: tjstum
 commentor added: nournia
 commentor added: paparomeo
 commentor added: neithere
 commentor added: prologic
 commentor added: skalkoto
 commentor added: saxtouri
 commentor added: glenbot
 commentor added: shawnsi
 commentor added: verigak
 commentor added: lugtigheid
 commentor added: coyotebush
 commentor added: victorhooi
 commentor added: frewsxcv
 commentor added: albertferras

Also note that I refrained from doing direct http API requests and used python API instead. These two ways should be equivalent.

:+1: for using the python api

Looks good to me :)

Thanks

Pull-Request has been merged by cverna

Metadata