Skip to content

Commit

Permalink
feat: short the lines
Browse files Browse the repository at this point in the history
  • Loading branch information
scientiststwin committed Dec 19, 2023
1 parent 6eacf8e commit 3672891
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
16 changes: 10 additions & 6 deletions dags/github_api_helpers/comments.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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


Expand Down
16 changes: 10 additions & 6 deletions dags/github_api_helpers/pull_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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


Expand Down

0 comments on commit 3672891

Please sign in to comment.