From adafb7cb066f17dcdc8d6448251d5d9ff404a065 Mon Sep 17 00:00:00 2001 From: Isaac Milarsky Date: Tue, 17 Aug 2021 09:39:29 -0500 Subject: [PATCH] Patch api endpoints for contributer data in order to grab last_used timestamp and full name Signed-off-by: Isaac Milarsky --- workers/worker_git_integration.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/workers/worker_git_integration.py b/workers/worker_git_integration.py index 0d66415dea..0ecc2402dc 100644 --- a/workers/worker_git_integration.py +++ b/workers/worker_git_integration.py @@ -406,6 +406,8 @@ def enrich_cntrb_id( "gh_received_events_url": contributor['received_events_url'], "gh_type": contributor['type'], "gh_site_admin": contributor['site_admin'], + "cntrb_last_used" : None if 'updated_at' not in contributor else contributor['updated_at'], + "cntrb_full_name" : None if 'name' not in contributor else contributor['name'], "tool_source": self.tool_source, "tool_version": self.tool_version, "data_source": self.data_source @@ -646,6 +648,8 @@ def query_github_contributors(self, entry_info, repo_id): "gh_received_events_url": contributor['received_events_url'], "gh_type": contributor['type'], "gh_site_admin": contributor['site_admin'], + "cntrb_last_used" : None if 'updated_at' not in contributor else contributor['updated_at'], + "cntrb_full_name" : None if 'name' not in contributor else contributor['name'], "tool_source": self.tool_source, "tool_version": self.tool_version, "data_source": self.data_source