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/27 10:18:40 UTC
[lucene-jira-archive] 01/01: tweak legacy-jira-label texts
This is an automated email from the ASF dual-hosted git repository.
tomoko pushed a commit to branch tweak-legacy-jira-labels
in repository https://gitbox.apache.org/repos/asf/lucene-jira-archive.git
commit 38ae67b29a18ed03175fc3d044f0969abe1e45f7
Author: Tomoko Uchida <to...@gmail.com>
AuthorDate: Wed Jul 27 19:18:30 2022 +0900
tweak legacy-jira-label texts
---
migration/src/jira2github_import.py | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/migration/src/jira2github_import.py b/migration/src/jira2github_import.py
index 3974d6f1..63b82db5 100644
--- a/migration/src/jira2github_import.py
+++ b/migration/src/jira2github_import.py
@@ -203,6 +203,33 @@ def convert_issue(num: int, dump_dir: Path, output_dir: Path, account_map: dict[
else:
logger.error(f"Unknown Component: {c}")
for label in jira_labels:
+ # GitHub does not allow commas in labels
+ label = label.replace(",","")
+ # several label texts have to be tweaked; otherwise import fails. don't know why.
+ # split tokens with '-'
+ if label == "queryparser":
+ label = "query-parser"
+ if label == "fastvectorhighlighter":
+ label = "fast-vector-highlighter"
+ # capitalize
+ if label == "highlighter":
+ label = "Highlighter"
+ if label.startswith("java"):
+ label = re.sub(r"^java", "Java", label)
+ # uncapitalize
+ if label == "Documentation":
+ label = "documentation"
+ if label == "Sort":
+ label = "sort"
+ if label == "Highlighting":
+ label = "highlighting"
+ if label == "Stemmer":
+ label = "stemmer"
+ if label == "Scorer":
+ label = "scorer"
+ # truncate
+ if label == "spatialrecursiveprefixtreefieldtype":
+ label = "spatialrecursiveprefixtree"
labels.append(f"legacy-jira-label:{label}")
if resolution:
labels.append(f"legacy-jira-resolution:{resolution}")