Polish a few sharp edges that hit me when running remap_cross_issue_links.py (#74)
diff --git a/migration/README.md b/migration/README.md
index 32b0e65..6daef26 100644
--- a/migration/README.md
+++ b/migration/README.md
@@ -105,7 +105,7 @@
### 5. Re-map cross-issue links on GitHub
-`src/remap_cross_issue_links.py` exports issues and comments from GitHub and save updated issue/comment bodies to `migration/github-remapped-data`.
+`src/remap_cross_issue_links.py` exports issues and comments from GitHub and saves updated issue/comment bodies to `migration/github-remapped-data`. Note that a given body and comment will only be saved into `migration/github-remapped-data` if it contained (now updated) issue cross-links.
```
(.venv) migration $ python src/remap_cross_issue_links.py --issues 40 41
diff --git a/migration/src/remap_cross_issue_links.py b/migration/src/remap_cross_issue_links.py
index 11d3bc5..5d1201f 100644
--- a/migration/src/remap_cross_issue_links.py
+++ b/migration/src/remap_cross_issue_links.py
@@ -68,11 +68,11 @@
check_authentication(github_token)
parser = argparse.ArgumentParser()
- parser.add_argument('--issues', type=int, required=False, nargs='*', help='GitHub issue number list to be downloaded')
- args = parser.parse_args()
-
mapping_data_dir = Path(__file__).resolve().parent.parent.joinpath(MAPPINGS_DATA_DIRNAME)
issue_mapping_file = mapping_data_dir.joinpath(ISSUE_MAPPING_FILENAME)
+ parser.add_argument('--issues', type=int, required=False, nargs='*', help=f'GitHub issue number list to be exported, else all GitHub issues in {issue_mapping_file.relative_to(Path.cwd())}')
+ args = parser.parse_args()
+
if not issue_mapping_file.exists():
logger.error(f"Jira-GitHub issue id mapping file not found. {issue_mapping_file}")
sys.exit(1)
@@ -102,4 +102,4 @@
logger.error(f"Failed to export/convert issue comments. Skipped issue {num}")
continue
- logger.info("Done.")
\ No newline at end of file
+ logger.info("Done.")