diff --git a/entrypoint.py b/entrypoint.py index 113e7b1..fc10c7b 100755 --- a/entrypoint.py +++ b/entrypoint.py @@ -124,12 +124,13 @@ def format_review_comment(summarized_review: str, chunked_reviews: List[str]) -> return summarized_review unioned_reviews = "\n".join(chunked_reviews) review = f""" -# Summary -{summarized_review} +

Summary

---- -#Chunks -{unioned_reviews} +{summarized_review.replace('\n', '
')} + +
+

Chunks

+{unioned_reviews.replace('\n', '
')} """ return review @@ -176,16 +177,14 @@ def main( chunked_reviews=chunked_reviews) - # write "test" to environment variable GITHUB_STEP_SUMMARY - os.environ["GITHUB_STEP_SUMMARY"] = "review_comment" # Create a comment to a pull request - # create_a_comment_to_pull_request( - # github_token=os.getenv("GITHUB_TOKEN"), - # github_repository=os.getenv("GITHUB_REPOSITORY"), - # pull_request_number=int(os.getenv("GITHUB_PULL_REQUEST_NUMBER")), - # git_commit_hash=os.getenv("GIT_COMMIT_HASH"), - # body=review_comment - # ) + create_a_comment_to_pull_request( + github_token=os.getenv("GITHUB_TOKEN"), + github_repository=os.getenv("GITHUB_REPOSITORY"), + pull_request_number=int(os.getenv("GITHUB_PULL_REQUEST_NUMBER")), + git_commit_hash=os.getenv("GIT_COMMIT_HASH"), + body=review_comment + ) if __name__ == "__main__":