You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by to...@apache.org on 2022/07/24 13:02:16 UTC

[lucene-jira-archive] branch main updated: Polish a few sharp edges that hit me when running remap_cross_issue_links.py (#74)

This is an automated email from the ASF dual-hosted git repository.

tomoko pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene-jira-archive.git


The following commit(s) were added to refs/heads/main by this push:
     new 9a667b10 Polish a few sharp edges that hit me when running remap_cross_issue_links.py (#74)
9a667b10 is described below

commit 9a667b1064dac822c58a45381500d9f8414d56ae
Author: Michael McCandless <mi...@apache.org>
AuthorDate: Sun Jul 24 09:02:12 2022 -0400

    Polish a few sharp edges that hit me when running remap_cross_issue_links.py (#74)
---
 migration/README.md                      | 2 +-
 migration/src/remap_cross_issue_links.py | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/migration/README.md b/migration/README.md
index 32b0e65c..6daef262 100644
--- a/migration/README.md
+++ b/migration/README.md
@@ -105,7 +105,7 @@ LUCENE-10502,https://github.com/mocobeta/migration-test-3/issues/44,44
 
 ### 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 11d3bc5f..5d1201f9 100644
--- a/migration/src/remap_cross_issue_links.py
+++ b/migration/src/remap_cross_issue_links.py
@@ -68,11 +68,11 @@ if __name__ == "__main__":
     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 @@ if __name__ == "__main__":
             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.")