Skip to content
This repository was archived by the owner on Oct 30, 2018. It is now read-only.
This repository was archived by the owner on Oct 30, 2018. It is now read-only.

Architecture of Issue Importer 2.0 #16

@karlcow

Description

@karlcow

@miketaylr So today I was working on the code and there were two many issues which were popping up with our discussions of the last few days. So before refactoring wildly and destroying everything that mike did. I want to know if it makes sense. ;)

Given a list of files with a JSON format containing each of them an issue,
A user may pipe the list of files to the issue importer to post them on Github.
(When I say webcompat below I may meant github in the backend)

  1. Grab the list of labels from webcompat, save them locally in a cache.
  2. For each file in the filelist:
    1. read the file content as JSON
    2. transform the JSON content to webcompat JSON with the relevant adapter [origin]
      1. Select the appropriate data
      2. Add the appropriate labels
      3. Generate the JSON
    3. check the validity
      1. If invalid: log the issue numbers in logfile and discard the file
      2. else: add the file to a batch folder.
  3. If github true:
    1. Ask confirmation that you are about to upload 1 million issues.
    2. For each of the file in the batch folder
      1. Upload the file to github
      2. Delete from the batch. (If there is an issue in the middle, you do not have to redo everything)
    3. Make a summary of what happened
  4. else: (dry-run):
    1. Give a summary of what it would have done without doing it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions