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/02 01:56:41 UTC
[lucene-jira-archive] branch main updated: Fill assignee field if github account is availale (#10)
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 28d5912d Fill assignee field if github account is availale (#10)
28d5912d is described below
commit 28d5912d7b4c8f171b5e90c1ccf3c4f5f7ece4b9
Author: Tomoko Uchida <to...@gmail.com>
AuthorDate: Sat Jul 2 10:56:36 2022 +0900
Fill assignee field if github account is availale (#10)
---
migration/mappings-data/account-map.csv.example | 3 ++-
migration/src/jira2github_import.py | 8 +++++---
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/migration/mappings-data/account-map.csv.example b/migration/mappings-data/account-map.csv.example
index 66836f18..e763fe90 100644
--- a/migration/mappings-data/account-map.csv.example
+++ b/migration/mappings-data/account-map.csv.example
@@ -1 +1,2 @@
-JiraName,GitHubAccount
\ No newline at end of file
+JiraName,GitHubAccount
+tomoko,mocobeta
\ No newline at end of file
diff --git a/migration/src/jira2github_import.py b/migration/src/jira2github_import.py
index 4d585415..654e0de3 100644
--- a/migration/src/jira2github_import.py
+++ b/migration/src/jira2github_import.py
@@ -61,9 +61,9 @@ def convert_issue(num: int, dump_dir: Path, output_dir: Path, account_map: dict[
pull_requests =extract_pull_requests(o)
reporter_gh = account_map.get(reporter_name)
- reporter = f"{reporter_dispname} ({reporter_gh})" if reporter_gh else f"{reporter_dispname}"
+ reporter = f"{reporter_dispname} (@{reporter_gh})" if reporter_gh else f"{reporter_dispname}"
assignee_gh = account_map.get(assignee_name)
- assignee = f"{assignee_dispname} ({assignee_gh})" if assignee_gh else f"{assignee_dispname}"
+ assignee = f"{assignee_dispname} (@{assignee_gh})" if assignee_gh else f"{assignee_dispname}"
# make attachment list
attachment_list_items = []
@@ -111,7 +111,7 @@ Pull Requests:
def comment_author(author_name, author_dispname):
author_gh = account_map.get(author_name)
- return f"{author_dispname} ({author_gh})" if author_gh else author_dispname
+ return f"{author_dispname} (@{author_gh})" if author_gh else author_dispname
comments = extract_comments(o)
comments_data = []
@@ -159,6 +159,8 @@ Updated: {comment_updated}
data["issue"]["updated_at"] = jira_timestamp_to_github_timestamp(updated)
if resolutiondate:
data["issue"]["closed_at"] = jira_timestamp_to_github_timestamp(resolutiondate)
+ if assignee_gh:
+ data["issue"]["assignee"] = assignee_gh
data_file = github_data_file(output_dir, num)
with open(data_file, "w") as fp: