This PR does a few things and each commit can be evaluated on its own, I tried to document the reasoning for the change in the commit messages, feel free to ask for more info if needed though.
In short what is happening:
- to_timestamp is moved out of the object since it does nothing with it, being a function instead of a method just makes sense then (I believe pylint might have pointed it out)
- Refactor the trac and pagure importer, the idea here is to allow for someone to get all the tickets of a trac/github project as JSON without having to deal with any of the git aspects. Basically, for migrating the rel-eng repo, I want to get the JSON blob of all the ticket in the releng trac on an existing, local git repo. Then I need to perform some checks and data manipulation, so I don't want to deal with this aspect of pagure-importer. So I moved the logic to clone the repo, generate the JSON blobs, commit and push to the CLI instead of it all being in the importer themselves. (Note: the commit is now done in a single step at the end which should also speed things up a little, especially for large repo)
- The last commit add a --nopush argument that allows to perform all the steps automatically except for pushing which can then be done manually, giving an opportunity to the user to review/inspect the changes before pushing them.
This PR does a few things and each commit can be evaluated on its own, I tried to document the reasoning for the change in the commit messages, feel free to ask for more info if needed though.
In short what is happening:
- to_timestamp is moved out of the object since it does nothing with it, being a function instead of a method just makes sense then (I believe pylint might have pointed it out)
- Refactor the trac and pagure importer, the idea here is to allow for someone to get all the tickets of a trac/github project as JSON without having to deal with any of the git aspects. Basically, for migrating the rel-eng repo, I want to get the JSON blob of all the ticket in the releng trac on an existing, local git repo. Then I need to perform some checks and data manipulation, so I don't want to deal with this aspect of pagure-importer. So I moved the logic to clone the repo, generate the JSON blobs, commit and push to the CLI instead of it all being in the importer themselves. (Note: the commit is now done in a single step at the end which should also speed things up a little, especially for large repo)
- The last commit add a
--nopushargument that allows to perform all the steps automatically except for pushing which can then be done manually, giving an opportunity to the user to review/inspect the changes before pushing them.