diff --git a/dags/github_api_helpers/comments.py b/dags/github_api_helpers/comments.py index 93880133..8a07182f 100644 --- a/dags/github_api_helpers/comments.py +++ b/dags/github_api_helpers/comments.py @@ -46,9 +46,11 @@ def fetch_repo_review_comments_page( ) ) - logging.info( - f"Found {len(updated_response_data)} comments for {owner}/{repo} on page {page}. comments: {updated_response_data}" - ) + msg = f"Found {len(updated_response_data)}" + msg += f" review comments for {owner}/{repo} on page {page}." + msg += f" comments: {updated_response_data}" + logging.info(msg) + return updated_response_data @@ -120,9 +122,11 @@ def fetch_repo_issues_and_prs_comments_page( map(lambda x: {**x, **extract_type_from_comment_response(x)}, response_data) ) - logging.info( - f"Found {len(updated_response_data)} comments for {owner}/{repo} on page {page}. comments: {updated_response_data}" - ) + msg = f"Found {len(updated_response_data)}" + msg += f" comments for {owner}/{repo} on page {page}." + msg += f" comments: {updated_response_data}" + logging.info(msg) + return updated_response_data diff --git a/dags/github_api_helpers/pull_requests.py b/dags/github_api_helpers/pull_requests.py index 6ea5fb5d..8a86a4fb 100644 --- a/dags/github_api_helpers/pull_requests.py +++ b/dags/github_api_helpers/pull_requests.py @@ -186,9 +186,11 @@ def fetch_pull_request_review_comments( response = get(endpoint, params=params) response_data = response.json() - logging.info( - f"Found {len(response_data)} review comments for pull request {pull_number} on page {page}. Comments: {response_data}" - ) + msg = f"Found {len(response_data)} review comments" + msg += f"for pull request {pull_number} on page {page}." + msg += f"Comments: {response_data}" + logging.info(msg) + return response_data @@ -238,9 +240,11 @@ def fetch_review_comment_reactions( response = get(endpoint, params=params) response_data = response.json() - logging.info( - f"Found {len(response_data)} reactions for review comment {comment_id} on page {page}. Reactions: {response_data}" - ) + msg = f"Found {len(response_data)} reactions" + msg += f"for review comment {comment_id} on page {page}." + msg += f"Reactions: {response_data}" + logging.info(msg) + return response_data