diff --git a/scripts/phab2github/phab2github.py b/scripts/phab2github/phab2github.py index 12316b5..2ba58f0 100644 --- a/scripts/phab2github/phab2github.py +++ b/scripts/phab2github/phab2github.py @@ -158,6 +158,7 @@ class Phab2Github: def apply_patch(self, diff: "Diff", raw_patch: str): """Apply a patch to the working copy.""" + # TODO: impersonate the original author of the patch proc = subprocess.run('git apply --ignore-whitespace --whitespace=fix -', input=raw_patch, shell=True, text=True, cwd=self.repo.working_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) if proc.returncode != 0: diff --git a/scripts/phab2github/phab_wrapper.py b/scripts/phab2github/phab_wrapper.py index 7f6d0ba..a221601 100644 --- a/scripts/phab2github/phab_wrapper.py +++ b/scripts/phab2github/phab_wrapper.py @@ -147,7 +147,7 @@ class PhabWrapper: # TODO: handle > 100 responses revision_response = self.phab.differential.revision.search( constraints=constraints) - revisions = [Revision(r, self.host) for r in revision_response.response['data']] + revisions = [Revision(r) for r in revision_response.response['data']] # TODO: only taking the first 10 to speed things up revisions = revisions[0:10] _LOGGER.info('Got {} revisions from the server'.format(len(revisions)))