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:54:31 UTC
[lucene-jira-archive] branch set-assignee created (now 9d886e8e)
This is an automated email from the ASF dual-hosted git repository.
tomoko pushed a change to branch set-assignee
in repository https://gitbox.apache.org/repos/asf/lucene-jira-archive.git
at 9d886e8e fill assignee field if github account is availale
This branch includes the following new commits:
new 9d886e8e fill assignee field if github account is availale
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[lucene-jira-archive] 01/01: fill assignee field if github account is availale
Posted by to...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tomoko pushed a commit to branch set-assignee
in repository https://gitbox.apache.org/repos/asf/lucene-jira-archive.git
commit 9d886e8e2009d87566db62ec509d478d2063d113
Author: Tomoko Uchida <to...@gmail.com>
AuthorDate: Sat Jul 2 10:54:22 2022 +0900
fill assignee field if github account is availale
---
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: