mreynolds / pagure-importer

Forked from pagure-importer 7 years ago
Clone

a0a9a53 Refactor the logic in import_issues for GitHub

Authored and Committed by pingou 7 years ago
    Refactor the logic in import_issues for GitHub
    
    Currently when calling import issues the program does several things:
    - Clone the git repo or rather lists all cloned repo and asks which one
    should be used
    - Queries all the tickets in GitHub
    - Convert them to JSON blob
    - Import them into the git repo selected in the first step
    - Push said git repo and delete it from the filesystem
    
    With this commits, the logic is moved into the CLI itself, which now
    does select where is the git repo to use, then does the querying of
    GitHub and converting to JSON, does the import into git in one step at
    the end speeding up the process and finally push and clean as before.
    
    This means that import_issues() can now be used outside of any git repo
    and it will just output the JSON blob in the specified directory.
    
    This commit performs the same change as the previous one but for GitHub
    instead of trac