Skip to content

Commit

Permalink
Merge pull request #2818 from chaoss/xdev
Browse files Browse the repository at this point in the history
Xdev: Final Patches for Release
  • Loading branch information
sgoggins authored Jun 10, 2024
2 parents 4e0ddcc + b1560c7 commit a7d5a27
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import requests
import logging
import traceback

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -48,8 +49,9 @@ def get_lastest_minor(version, data):
try:
versions = data['versions']
except Exception as e:
logger.info(f'error is {e} on the NPM. Hey, its NODEJS, of course it does not work :D ')
raise e
logger.info(
''.join(traceback.format_exception(None, e, e.__traceback__)))
# raise e

try:
index = list(versions.keys()).index(version)
Expand Down
14 changes: 13 additions & 1 deletion augur/tasks/github/pull_requests/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
from ..messages.tasks import process_github_comment_contributors
from augur.tasks.github.util.github_random_key_auth import GithubRandomKeyAuth

import httpx

from typing import Generator, List, Dict


Expand Down Expand Up @@ -212,7 +214,6 @@ def process_pull_request_review_contributor(pr_review: dict, tool_source: str, t

return pr_review_cntrb


@celery.task(base=AugurSecondaryRepoCollectionTask)
def collect_pull_request_review_comments(repo_git: str) -> None:

Expand Down Expand Up @@ -368,6 +369,17 @@ def collect_pull_request_reviews(repo_git: str) -> None:
if len(page_data) == 0:
break

if isinstance(page_data, list):
page_data = [
element.decode('utf-8').replace('\x00', ' ') if isinstance(element, bytes) else element
for element in page_data
]
logger.info(f"NUL characters were found in PR Reviews and replaced with spaces.")
elif isinstance(page_data, bytes):
page_data = page_data.decode('utf-8').replace('\x00', ' ')
logger.info(f"NUL characters were found in PR Reviews and replaced with spaces.")


pr_reviews.extend(page_data)

if pr_reviews:
Expand Down

0 comments on commit a7d5a27

Please sign in to comment.